View source: R/helper_functions.R
pathfinder is a helper function to calculate trajectory distances from starting cell to every other cell in the data set. This function is based on Dijkstra shorthest path algortihm with implementation of waypoints as a correctives for distances Notes: calculation of distances from waypoints to all other cells is needed for weighing scheme this function merges two separate functions in MATALB version of the package (pathFinder and trajectory_waypoints_p) output is a list, that can be exported (needs modification of the main function), however tSpace function records only final_trajectory variable
1 | pathfinder(data, lknn, s, waypoints, voting_scheme, distance = D)
|
a list with final trajectory, all unreachable data points, indices of waypoints, a matrix of trajectory distances aligned to positions of the waypoints and a matrix of original distances from the start cell and all waypoints.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.