3.3. Merge
The merge module includes a function to compute merge trees and a function to test if a networkx graph or reeb graph is a merge tree.
- cereeberus.compute.merge.isMerge(T, fx)[source]
This function takes in a networkx tree or reeb graph and function, and checks to see if it is a merge tree. This assumes that the root node(s) has/have a function value of np.inf.
- Parameters:
T (Reeb Graph) – Networkx graph or reeb graph
fx (dict) – function values
- Returns:
True if T is a merge tree, False if T is not a merge tree
- Return type:
isMerge(bool)
- cereeberus.compute.merge.computeMergeTree(R, filtration=[[8, 0], [8, 7], 1], infAdjust=None, precision=5, size=0, verbose=False, filter=False)[source]
main function to build merge tree for a given graph and filtration
- Parameters:
R (Reeb Graph) – Reeb Graph
filtration (tuple of tuples) – filtration for merge tree
infAdjust (int) – parameter to adjust infinite value for root node
precision (int) – precision
size (int) – size
verbose (bool) – verbose
- Returns:
Merge Tree as a Reeb Graph object
- Return type:
rmt