Represents a cluster of activity points, providing main methods to manage and analyze them.
More...
#include <PointsCluster.hpp>
Represents a cluster of activity points, providing main methods to manage and analyze them.
◆ PointsCluster()
| dsf::mdt::PointsCluster::PointsCluster |
( |
PointsCluster const & | other | ) |
|
|
default |
◆ addActivityPoint()
| void dsf::mdt::PointsCluster::addActivityPoint |
( |
ActivityPoint const & | activityPoint | ) |
|
Add an activity point to the cluster.
- Parameters
-
| activityPoint | The activity point to add. |
◆ addPoint()
| void dsf::mdt::PointsCluster::addPoint |
( |
std::time_t | timestamp, |
|
|
dsf::geometry::Point const & | point ) |
Add a point with timestamp to the cluster.
- Parameters
-
| timestamp | The timestamp of the activity point. |
| point | The geometric point of the activity point. |
◆ centroid()
Compute and return the centroid of the cluster.
- Returns
- The centroid point of the cluster.
◆ duration()
| std::time_t dsf::mdt::PointsCluster::duration |
( |
| ) |
const |
Get the duration (in seconds) between the first and last activity points.
- Returns
- The duration in seconds.
- Exceptions
-
| std::runtime_error | if the cluster is empty. |
◆ empty()
| bool dsf::mdt::PointsCluster::empty |
( |
| ) |
const |
|
inlinenoexcept |
Check if the cluster is empty.
- Returns
- True if the cluster has no activity points, false otherwise.
◆ firstTimestamp()
| std::time_t dsf::mdt::PointsCluster::firstTimestamp |
( |
| ) |
const |
Get the timestamp of the first activity point in the cluster.
- Returns
- The timestamp of the first activity point.
- Exceptions
-
| std::runtime_error | if the cluster is empty. |
◆ lastTimestamp()
| std::time_t dsf::mdt::PointsCluster::lastTimestamp |
( |
| ) |
const |
Get the timestamp of the last activity point in the cluster.
- Returns
- The timestamp of the last activity point.
- Exceptions
-
| std::runtime_error | if the cluster is empty. |
◆ operator=()
◆ points()
| std::vector< ActivityPoint > const & dsf::mdt::PointsCluster::points |
( |
| ) |
const |
|
inlinenoexcept |
Get the underlying activity points.
- Returns
- A const reference to the vector of activity points.
◆ size()
| std::size_t dsf::mdt::PointsCluster::size |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of activity points in the cluster.
- Returns
- The size of the cluster.
The documentation for this class was generated from the following files:
- src/dsf/mdt/PointsCluster.hpp
- src/dsf/mdt/PointsCluster.cpp