Get Trajectory for a Vertex Within a Specific Cell
Source:R/gfc_flow.R
vertex.cell.trajectory.gfc.flow.RdReturns the trajectory passing through a vertex that belongs to a specific cell defined by its minimum and maximum extrema. A cell is uniquely identified by its (min, max) endpoint pair.
Arguments
- gfc.flow
A gfc.flow object from
compute.gfc.flow()with trajectories computed (i.e.,store.trajectories = TRUE).- vertex
Single integer vertex index (1-based).
- min.id
Minimum extremum identifier: either a label (e.g., "m4", "sm1") or a vertex index (integer, 1-based).
- max.id
Maximum extremum identifier: either a label (e.g., "M1", "sM2") or a vertex index (integer, 1-based).
- map
Optional integer vector mapping graph indices to subgraph vertices. If provided, trajectory vertices are converted to subgraph indices.
Value
A trajectory structure (list) if found, or NULL if no trajectory
passes through the vertex within the specified cell. If map is
provided, the returned trajectory has its vertex indices remapped.
Details
This function is useful when a vertex belongs to multiple cells (due to
overlapping basins) and you need to retrieve the specific trajectory
associated with a particular cell. For vertices with unique cell membership,
vertex.all.trajectories.gfc.flow() may be simpler to use.
Examples
if (FALSE) { # \dontrun{
## Get trajectory for vertex 100 in cell (m2, M3)
traj <- vertex.cell.trajectory.gfc.flow(gfc.flow.res, 100, "m2", "M3")
## Using vertex indices instead of labels
traj <- vertex.cell.trajectory.gfc.flow(gfc.flow.res, 100, 432, 718)
## With subgraph mapping
traj <- vertex.cell.trajectory.gfc.flow(gfc.flow.res, 100, "m2", "M3",
map = subgraph.map)
} # }