merge {DASC} | R Documentation |
Combine two trees into one
merge(x, y, X)
x |
the index of the node |
y |
the index of the node |
X |
the saved vector with the information of the parent of every node |
During the traversal of the graph matrix, merge function joins two disjoint sets into a single subset. It is a union step of Disjoint-set algorithm by Bernard A. Galler and Michael J. Fischer. For further details, please refer to: https://en.wikipedia.org/wiki/Disjoint-set_data_structure
X
A updated X vector with updates on father of every node
Haidong Yi, Ayush T. Raman