Skip to contents

Creates label tables and indicator vectors for local minima and maxima in a Morse-Smale complex. The label tables map point IDs to their corresponding labels, while indicator vectors mark the presence/absence of critical points in the state space.

Usage

create.lmin.lmax.label.indicators(lmin.labels, lmax.labels, state.space)

Arguments

lmin.labels

Named character vector of labels for local minima

lmax.labels

Named character vector of labels for local maxima

state.space

State space matrix where rownames correspond to point IDs

Value

A list with four components:

lmin.lab.tbl

Named character vector mapping point IDs to local minima labels

lmax.lab.tbl

Named character vector mapping point IDs to local maxima labels

lmin.ind

Numeric vector indicating local minima (1) and non-minima (0)

lmax.ind

Numeric vector indicating local maxima (1) and non-maxima (0)

Details

The function processes both local minima and maxima labels to create:

  1. Label tables that map point IDs to their corresponding labels

  2. Binary indicator vectors marking the presence (1) or absence (0) of critical points All vectors maintain the same length as the number of rows in state.space and use consistent naming.

Examples

if (FALSE) { # \dontrun{
# Given lmin.labels, lmax.labels and state space matrix state.space
result <- create.lmin.lmax.label.indicators(lmin.labels, lmax.labels, state.space)
print(head(result$lmin.lab.tbl))
print(sum(result$lmin.ind)) # Number of local minima
} # }