Skip to contents

Extracts all stored trajectories associated with a single extremum (a basin) from a gfc.flow object. For a maximum basin, this returns all trajectories whose end.vertex equals the basin maximum and that end at a local maximum. For a minimum basin, this returns all trajectories whose start.vertex equals the basin minimum and that start at a local minimum.

Usage

# S3 method for class 'trajectories.gfc.flow'
basin(
  object,
  basin.id,
  map = NULL,
  trajectory.format = c("vertices", "with.y.hat.modified"),
  gfc.flow = object,
  ...
)

Arguments

object

A gfc.flow object from compute.gfc.flow().

basin.id

Basin identifier. Can be:

  • a label (character), e.g. "M1" or "m2"

  • a vertex index (numeric/integer), matching summary(.all)$vertex

  • (fallback) an integer row index within the extrema of the inferred type (only used if it does not match any vertex index)

map

Optional integer vector giving a vertex mapping (domain vertex IDs); if provided, returned trajectory vertices are mapped to indices via match().

trajectory.format

Output format for result$trajectories.

"vertices"

(Default) List of integer vectors (vertex indices).

"with.y.hat.modified"

List of lists with $vertices and $y.hat.modified (NULL if not available).

gfc.flow

Backward-compatible alias for object.

...

Additional arguments (currently ignored).

Value

An object of class gfc_basin_trajectories with components:

  • type ("min" or "max")

  • basin.vertex, basin.label, basin.value

  • basin.is.spurious

  • trajectories (format controlled by trajectory.format)

  • n.trajectories

  • mapped, original.basin.vertex