Skip to contents

List Basins for gfc.flow

Usage

# S3 method for class 'gfc.flow'
list.basins(
  x,
  type = c("min", "max"),
  include.spurious = TRUE,
  with.rel.value = TRUE,
  include.spurious.flags = FALSE,
  include.absorbed = FALSE,
  group.by.spurious = TRUE,
  loc = NULL,
  ...
)

Arguments

x

A gfc.flow object from compute.gfc() trajectory modes (or compute.gfc.trajectory() / deprecated compute.gfc.flow()).

type

One of "min" or "max".

include.spurious

Logical; if TRUE (default), include basins whose defining extremum is spurious.

with.rel.value

Logical; if TRUE (default), includes relative value (value/mean(y)) for local extrema.

include.spurious.flags

Logical; if TRUE, include spurious-related columns from summary.all (e.g., is.spurious, filter.stage, merged.into). Default FALSE.

include.absorbed

Logical; if FALSE, absorbed extrema are not shown. Default FALSE.

group.by.spurious

Logical; if TRUE, lists retained (refined) extrema first and then spurious extrema, each block sorted by basin size (and then ties).

loc

Optional. If non-NULL, filter to a single basin extremum (vertex index or label).

...

Additional arguments reserved for method compatibility.

Value

A data frame with basin-level columns including:

label

Extremum label.

vertex

Extremum vertex index.

type

"min" or "max".

basin.size

Number of vertices in the basin (from summary/all).

n.cells

Number of incident cells (min-max pairs).

n.trajectories

Total number of trajectories across incident cells.