Skip to contents

Returns the canonical branches, merge events, crossing-free leaf order, and plotting coordinates for one direction and graph component without drawing. A restricted set of canonical basin ids must contain its component root and every ancestor unless close.ancestors = TRUE, in which case the missing ancestors are added and reported. Scalar-field birth, death, merge, and persistence values are preserved exactly from the canonical merge tree.

Usage

get.basin.merge.tree.layout(
  x,
  direction = "max",
  component = NULL,
  basin.ids = NULL,
  close.ancestors = FALSE,
  label = c("basin.id", "extremum.id", "extremum.vertex"),
  labels = NULL
)

Arguments

x

A basin.merge.tree, or a compatible basin_complex.

direction

Tree orientation, "max" or "min".

component

Graph-component number. It may be omitted when the selected direction has one component, or when basin.ids identify exactly one component.

basin.ids

Optional nonempty character vector of canonical basin ids. NULL selects the complete component.

close.ancestors

Add missing canonical ancestors of basin.ids.

label

Canonical basin-table field used for branch labels.

labels

Optional custom labels. A named vector is matched by basin id; an unnamed vector follows deterministic selected-branch order.

Value

A basin.merge.tree.layout list containing the requested and closure-added ids, selected canonical branch and event tables, component root, restricted crossing-free leaf order, dendrogram representation, branch and event coordinates, and validation status.

Details

This accessor is the common computational boundary for static and interactive merge-tree consumers. Restricting the display never constructs an induced graph or recomputes the canonical basin complex.