Skip to contents

Retrieves and returns a specific basin from a basin complex object by its label. The function searches through both ascending (minima) and descending (maxima) basins.

Usage

# S3 method for class 'basin_cx'
show.basin(x, basin.label, ...)

Arguments

x

A basin complex object returned by create.basin.cx().

basin.label

Character string specifying the basin label to retrieve (e.g., "M1" or "m2").

...

Additional arguments (not used).

Value

A basin list corresponding to the requested label. If no basin with the specified label is found, the function returns NULL and prints a message.

Details

Basin labels follow the naming convention of the basin complex: "Mx" for maxima (descending) and "mx" for minima (ascending), where x is a sequential number assigned during the basin complex construction.

The returned basin list typically contains:

  • vertex: 1-based index of the extremum vertex

  • value: Function value at the extremum

  • label: The basin label matching the requested label

  • basin: Matrix with vertex indices and distances from the extremum

  • basin_bd: Matrix of boundary vertices and their monotonicity spans