merge {DASC} | R Documentation

## Combine two trees into one

### Description

Combine two trees into one

### Usage

    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

[Package DASC version 1.1.0 Index]