5 #include "Trajectory.h"
17 typedef pair<int,int> IntIntPair;
18 typedef vector<IntIntPair> IntIntPairArray;
19 typedef vector<float> FloatArray;
20 typedef vector<FloatArray> FloatMatrix;
21 typedef vector<vector<IntIntPair>> IntIntPairMatrix;
23 #define DISTANCE_MATRIX(_x,_y) ((*m_distanceIndex)[_x])[(_y)]
24 #define LENGTH_ARRAY(_x) ((*m_lengthArray)[_x])
36 CDistanceOutlier(
int nTrajectories,
int nLineSegments, IntIntPairArray* idArray, FloatMatrix* distanceIndex);
39 bool DetectOutlyingLineSegment(vector<bool>* result);
44 void SetLengthArray(FloatArray* lengthArray) { m_lengthArray = lengthArray; }
47 { m_closePartitionArrayIndexMap = indexMap; m_closePartitionArray = partitionMatrix; }
56 int GetNumOfNearTrajectories(
int index);
57 bool IsTrajectoryNear(
int lineSegmentId,
int trajectoryId);
58 void ConstructRangeOfTrajectory();
59 void MeasureDensityOfLineSegment();
61 #if defined(__VISUALIZE_DEBUG_INFO__)
62 void GetLineSegmentPoint(
int lineSegmentId, CPoint* start, CPoint* end);
63 void GetLineSegmentPoint(
int trajectoryId,
int index, CPoint* start, CPoint *end);
70 IntIntPairArray* m_idArray;
71 FloatMatrix* m_distanceIndex;
72 FloatArray* m_lengthArray;
73 float m_fractionParam;
74 float m_distanceParam;
75 int m_nNearTrajectories;
76 IntIntPairArray m_trajectoryRange;
77 FloatArray m_densityArray;
78 string m_densityFilePath;
80 map<IntIntPair,int>* m_closePartitionArrayIndexMap;
81 IntIntPairMatrix* m_closePartitionArray;
82 map<IntIntPair,float>* m_finePartitionLengthMap;
83 map<IntIntPair,int>* m_coarsePartitionIdMap;
A simple point class.
Definition: MDPoint.h:10
void SetDistanceParameter(float distance)
Setter for the distance parameter D.
Definition: DistanceOutlier.h:42
void SetDensityFilePath(string filePath)
Set file path for precomputed density file.
Definition: DistanceOutlier.h:53
void SetFractionParameter(float fraction)
Setter for the fraction of trajectories that must be far to be called an outlier (in the paper...
Definition: DistanceOutlier.h:40
void SetCoarsePartitionId(map< IntIntPair, int > *idMap)
Setter for mapping of coarse partition IDs.
Definition: DistanceOutlier.h:51
void SetCloseTrajectoryPartition(map< IntIntPair, int > *indexMap, IntIntPairMatrix *partitionMatrix)
Setter for mappings required for partition pruning optimization.
Definition: DistanceOutlier.h:46
Handles partition outlier computation.
Definition: DistanceOutlier.h:33
The main class, and handler for all of the trajectory data.
Definition: TrajData.h:22
void SetFinePartitionLength(map< IntIntPair, float > *lengthMap)
Setter for lengths of fine level partitions.
Definition: DistanceOutlier.h:49
void SetLengthArray(FloatArray *lengthArray)
Setter for the array of partition lengths.
Definition: DistanceOutlier.h:44