Trace all paths from saddles to dual critical points in the spanning forest.
Source:R/utils_dmt.R
trace_paths.RdBecause the dual spanning forest is a maximum spanning forest on triangles in the mesh, the paths that are traced between saddles and critical triangles (maxima) will follow ridges, separating points into components with the strongest boundaries.
Arguments
- dmt
A DMT data structure with the following attributes:
edges$from_tri: Index of first triangle joined by each edge (1-indexed).edges$to_tri: Index of second triangle joined by each edge (1-indexed).
- dual
A dual maximum spanning forest on triangles:
labels: A lengthnum_trianglesvector of labels for the connected components in the maximum spanning tree. Each connected component is labeled by the index of its critical triangle.parent: A lengthnum_trianglesvector containing the parent (source) triangle for each triangle in the directed spanning forest. Critical triangles have no parent, so the value should be ignored.parent_edge: A lengthnum_trianglesvector containing the directed edge that has each triangle as a target node. Critical triangles have no parent edge, so the value should be ignored.
- saddles
A length
num_saddlesvector with edge indices for saddle edges (1-indexed).