
Last chance! 50% off unlimited learning
Sale ends in
Will calculate geodesic distances between cells within a trajectory. To speed things up, only the distances with a set of waypoint cells are calculated.
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
)
The trajectory as created by infer_trajectory()
or add_trajectory()
A vector of waypoint cells. Only the geodesic distances between waypoint cells and all other cells will be calculated.
The milestone percentages of non-cell waypoints, containing waypoint_id, milestone_id and percentage columns
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
A matrix containing geodesic distances between each waypoint cell (rows) and cell (columns)
The geodesic distance takes into account the length of an edge regions of delayed commitment.
# NOT RUN {
geodesic_distances <- calculate_geodesic_distances(example_trajectory)
geodesic_distances[1:10, 1:10]
# }
Run the code above in your browser using DataLab