DistanceGeometery Module

Module contents

template<typename trajectory_type>
std::vector<double> tracktable::distance_geometry_by_distance(trajectory_type const &trajectory, unsigned int depth)

Create distance geometry signature with samples by distance.

This function computes the multilevel distance geometry for a given trajectory. Each level d approximates the input trajectory with d equal-length line segments. The distance geometry values for that level are the lengths of all d line segments, normalized to lie between 0 and 1.

The D-level distance geometry for a curve will result in (D * (D+1)) / 2 separate values.

This implementation creates the endpoints of the line segments by sampling the trajectory at fractions of total distance traveled. To sample by total duration, use distance_geometry_by_time().

Arguments: trajectory {Tracktable trajectory}: Input curve to analyze depth {unsigned int}: How many levels to compute. Must be greater than zero.

Returns: std::vector<double> containing the distance geometry values laid out consecutively by increasing depth.

template<typename trajectory_type>
std::vector<double> tracktable::distance_geometry_by_time(trajectory_type const &trajectory, unsigned int depth)

Create distance geometry signature with samples by time.

This function computes the multilevel distance geometry for a given trajectory. Each level d approximates the input trajectory with d equal-length line segments. The distance geometry values for that level are the lengths of all d line segments, normalized to lie between 0 and 1.

The D-level distance geometry for a curve will result in (D * (D+1)) / 2 separate values.

This implementation creates the endpoints of the line segments by sampling the trajectory at fractions of total duration traveled. To sample by total travel distance, use distance_geometry_by_distance().

Arguments: trajectory {Tracktable trajectory}: Input curve to analyze depth {unsigned int}: How many levels to compute. Must be greater than zero.

Returns: std::vector<double> containing the distance geometry values laid out consecutively by increasing depth.