maljovec / topopy

A library for computing topological data structures stemming from Morse Theory. Given a set of arbitrarily arranged points in any dimension, this library is able to construct approximate topological structures using a neighborhood graph to simulate manifold structures.
BSD 3-Clause "New" or "Revised" License
20 stars 6 forks source link

Single Component #7

Closed orpheus92 closed 6 years ago

orpheus92 commented 6 years ago

So right now when the k parameter is not large enough, the partitions will not be merged to 1 single component. I need to add validation check on that. Do you think it makes more sense to add that in topopy or post_process?

maljovec commented 6 years ago

This problem should already be addressed by nglpy (see here), but unfortunately it is not exposed to either the python interface for nglpy or here. We can possibly just expose that feature in both cases, so all you have to do is set a flag that says connected=True. Does the fact that the data is not one connected component cause any troubles on your end? In theory, you should still be able to process everything with mulitple connected components. Your tree will just have more than one root node.

maljovec commented 6 years ago

We can add two functionalities. One for exposing this parameter so you can ensure your data is connected before performing a Morse-Smale decomposition on it, and we can also add a function is_single_component() or connected_components() that returns either a boolean or a count of the number of connected components exist in the data.