calculate_geodesic_distances {dynwrap}R Documentation

Calculate geodesic distances between cells in a trajectory

Description

Will calculate geodesic distances between cells within a trajectory. To speed things up, only the distances with a set of waypoint cells are calculated.

Usage

calculate_geodesic_distances(
  trajectory,
  waypoint_cells = NULL,
  waypoint_milestone_percentages = NULL,
  directed = FALSE
)

compute_tented_geodesic_distances(
  trajectory,
  waypoint_cells = NULL,
  waypoint_milestone_percentages = NULL
)

Arguments

trajectory

The trajectory as created by infer_trajectory() or add_trajectory()

waypoint_cells

A vector of waypoint cells. Only the geodesic distances between waypoint cells and all other cells will be calculated.

waypoint_milestone_percentages

The milestone percentages of non-cell waypoints, containing waypoint_id, milestone_id and percentage columns

directed

Take into account the directions of the milestone edges. The cells that cannot be reached from a particular waypoint will have distance infinity. You can also give a character, if it is "forward" it will look forward, if it is "reverse" it will look in the reversed direction

Details

The geodesic distance takes into account the length of an edge regions of delayed commitment.

Value

A matrix containing geodesic distances between each waypoint cell (rows) and cell (columns)

Examples

geodesic_distances <- calculate_geodesic_distances(example_trajectory)
geodesic_distances[1:10, 1:10]


[Package dynwrap version 1.2.2 Index]