Skip to contents

Front-end basin merge utility for objects returned by compute.gfc(). This function supports both output classes:

Usage

# S3 method for class 'gfc.basins'
merge(
  x,
  y = NULL,
  adj.list = y,
  weight.list = NULL,
  merge.map = NULL,
  losers = NULL,
  winners = NULL,
  type = c("max", "min"),
  connector.method = c("closest", "shortest", "high.saddle", "high.saddle.shortest"),
  mark.loser.spurious = TRUE,
  merge.filter.stage = "MERGE",
  verbose = TRUE,
  ...
)

Arguments

x

Object returned by compute.gfc().

y

Optional alias for adj.list (kept for compatibility with merge.gfc.flow.basins()).

adj.list

Optional adjacency list. For gfc.flow, if omitted it is taken from x$adj.list when available.

weight.list

Optional edge-weight list. For gfc.flow, if omitted it is taken from x$weight.list when available.

merge.map

Named character/integer vector specifying merges. Names are losers, values are winners.

losers

Optional vector of losers (labels or vertex indices), used when merge.map is not supplied.

winners

Optional vector of winners (labels or vertex indices), used when merge.map is not supplied.

type

Extremum type to merge: "max" or "min".

connector.method

Connector policy for gfc.flow dispatch.

mark.loser.spurious

Used by gfc.flow dispatch.

merge.filter.stage

Used by gfc.flow dispatch.

verbose

Logical.

...

Additional arguments passed to the underlying merge implementation.

Value

Object of the same class as x, with requested basin merges applied.