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

How to define a morse function on a simplicial complex? #40

Open mehdihosseinimoghadam opened 3 years ago

mehdihosseinimoghadam commented 3 years ago

Is it possible to define a morse function and how to get the morse function values of each simplex?

dmaljovec commented 3 years ago

I'm not sure I understand what you are asking, but I'll take a crack at my interpretation. You provide the data, and topopy will do its best to create a Morse function out of it by using a technique similar to that described in the opening paragraph of Simulation of Simplicity:

Consider, for example, a program that sorts an array of integers using a comparison as a primitive operation. A special, or degenerate, case occurs when the program attempts to decide which one of two equal numbers is smaller than the other. A typical way to resolve this tie is to pretend that the number with smaller index is smaller (assuming the integers are indexed, e.g., by their positions in an array)

So, anytime a flat region is encountered (an edge exists between two points with the same function value), the lower index point will be considered the "smaller" value and thus the gradient of the edge will flow towards the higher index point. This ensures a consistent resolution. The function values remain unmodified and would in fact look the same under inspection or visualization.