merge: Combine two trees into one

Description Usage Arguments Details Value Author(s)

View source: R/DASC.R

Description

Combine two trees into one

Usage

1
merge(x, y, X)

Arguments

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

Details

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

Value

X A updated X vector with updates on father of every node

Author(s)

Haidong Yi, Ayush T. Raman


DASC documentation built on Nov. 17, 2017, 9:36 a.m.