Dynamical system model
Loading...
Searching...
No Matches
dsf::mdt::Trajectory Class Reference

Public Member Functions

void addCluster (PointsCluster &&cluster)
 Add a PointsCluster to the trajectory.
 
void addCluster (PointsCluster const &cluster)
 
void addPoint (std::time_t timestamp, dsf::geometry::Point const &point)
 Add a point with timestamp to the trajectory.
 
void filter (double const cluster_radius_km, double const max_speed_kph)
 Filter the trajectory to identify stop points based on clustering and speed criteria.
 
void sort () noexcept
 Sort the trajectory points by timestamp.
 
std::size_t size () const noexcept
 Get the number of points in the trajectory.
 
bool empty () const noexcept
 Check if the trajectory is empty.
 
auto const & points () const noexcept
 Get the underlying points map.
 

Member Function Documentation

◆ addCluster()

void dsf::mdt::Trajectory::addCluster ( PointsCluster && cluster)

Add a PointsCluster to the trajectory.

Parameters
clusterThe PointsCluster to add.

◆ addPoint()

void dsf::mdt::Trajectory::addPoint ( std::time_t timestamp,
dsf::geometry::Point const & point )

Add a point with timestamp to the trajectory.

Parameters
timestampThe timestamp of the activity point.
pointThe geometric point of the activity point.

◆ empty()

bool dsf::mdt::Trajectory::empty ( ) const
inlinenoexcept

Check if the trajectory is empty.

Returns
True if the trajectory has no points, false otherwise.

◆ filter()

void dsf::mdt::Trajectory::filter ( double const cluster_radius_km,
double const max_speed_kph )

Filter the trajectory to identify stop points based on clustering and speed criteria.

Parameters
cluster_radius_kmThe radius (in kilometers) to use for clustering points.
max_speed_kphThe max allowed speed (in km/h) to consider a cluster as a stop point.

◆ points()

auto const & dsf::mdt::Trajectory::points ( ) const
inlinenoexcept

Get the underlying points map.

Returns
A const reference to the map of points.

◆ size()

std::size_t dsf::mdt::Trajectory::size ( ) const
inlinenoexcept

Get the number of points in the trajectory.

Returns
The size of the trajectory.

The documentation for this class was generated from the following files: