Skip to contents

Computes gradient flow trajectories on a graph while preventing basin-jumping between different regions of attraction by enforcing monotonicity along paths in a core graph.

Usage

graph.constrained.gradient.flow.trajectories(graph, core.graph, Ey)

Arguments

graph

List of integer vectors representing the h-th power graph pIG_k^h(X)

core.graph

List of integer vectors representing the core graph pIG_k(X)

Ey

Numeric vector of function values at vertices

Value

List containing:

  • lext - Matrix with two columns containing local minima and maxima for each vertex

  • trajectories - List of integer vectors containing complete trajectories

Details

The function ensures that trajectories follow paths that are monotonic in the core graph, preventing undesirable jumps between basins of attraction of different local maxima. Indices in graph and core.graph are converted from 1-based (R) to 0-based (C++) indexing.

Examples

if (FALSE) { # \dontrun{
trajectories <- graph.constrained.gradient.flow.trajectories(graph, core.graph, Ey)
local.extrema <- trajectories$lext
paths <- trajectories$trajectories
} # }