Trajectory Outlier Detection Library
 All Classes Functions Variables Pages
Outlier.h
1 #pragma once
2 
3 // COutlier command target
4 
5 #include "MDPoint.h"
6 #include "Trajectory.h"
7 #include <vector>
8 
9 #include <set>
10 using namespace std;
11 
12 
13 typedef pair<CMDPoint,CMDPoint> LineSegment;
14 
21 class COutlier
22 {
23 friend class COutlierDetector;
24 public:
25  COutlier();
26  COutlier(int id, int trajectoryId, int nDimensions);
27  virtual ~COutlier();
28 private:
29  int m_outlierId; // the identifier of this outlier
30  int m_nDimensions; // the dimensionality of this outlier
31  int m_trajectoryId; // the identifier of the trajectory that this outlier belongs to
32  int m_nOutlyingPartitions; // the number of outlying trajectory partitions in this outlier
33  vector <LineSegment> m_outlyingPartitionArray; // the array of outlying trajectory partitions
34  float m_outlyingRatio; // the ratio of the outlying length to the entire length
35  int m_nPenWidth; // the width of the pen for drawing a cluster
36 public:
37  void SetId(int id) { m_outlierId = id; }
39  const int GetId() const { return m_outlierId; }
41  const int GetTrajectoryId() const { return m_trajectoryId; }
43  const int GetNOutlyingPartitions() const { return m_nOutlyingPartitions; }
45  const vector<LineSegment> GetOutlyingPartitionArray() const { return m_outlyingPartitionArray; }
47  const float GetOutlyingRatio() const { return m_outlyingRatio; }
49  void SetupInfo(CTrajectory* pTrajectory);
50 };
void SetId(int id)
Setter for the outlier ID.
Definition: Outlier.h:37
const int GetTrajectoryId() const
Getter for the trajectory ID.
Definition: Outlier.h:41
A trajectory outlier.
Definition: Outlier.h:21
const int GetNOutlyingPartitions() const
Getter for the number of outlying partitions in the outlying trajectory.
Definition: Outlier.h:43
A high-level class to perform the outlier detection.
Definition: OutlierDetector.h:26
The main storage for information about a trajectory.
Definition: Trajectory.h:28
const float GetOutlyingRatio() const
Getter for the ratio of outlying partition length to total length.
Definition: Outlier.h:47
const int GetId() const
Getter for the outlier ID.
Definition: Outlier.h:39
const vector< LineSegment > GetOutlyingPartitionArray() const
Getter for the array of outlying partitions.
Definition: Outlier.h:45