Handles partition outlier computation.
More...
#include <DistanceOutlier.h>
|
| CDistanceOutlier (int nTrajectories, int nLineSegments, IntIntPairArray *idArray, FloatMatrix *distanceIndex) |
| Constructor. More...
|
|
bool | DetectOutlyingLineSegment (vector< bool > *result) |
| Determines if any of the partitions are outlying or not. More...
|
|
void | SetFractionParameter (float fraction) |
| Setter for the fraction of trajectories that must be far to be called an outlier (in the paper, "p")
|
|
void | SetDistanceParameter (float distance) |
| Setter for the distance parameter D.
|
|
void | SetLengthArray (FloatArray *lengthArray) |
| Setter for the array of partition lengths.
|
|
void | SetCloseTrajectoryPartition (map< IntIntPair, int > *indexMap, IntIntPairMatrix *partitionMatrix) |
| Setter for mappings required for partition pruning optimization.
|
|
void | SetFinePartitionLength (map< IntIntPair, float > *lengthMap) |
| Setter for lengths of fine level partitions.
|
|
void | SetCoarsePartitionId (map< IntIntPair, int > *idMap) |
| Setter for mapping of coarse partition IDs.
|
|
void | SetDensityFilePath (string filePath) |
| Set file path for precomputed density file.
|
|
|
int | GetNumOfNearTrajectories (int index) |
| Returns the number of trajectories that are close to the line segment. More...
|
|
bool | IsTrajectoryNear (int lineSegmentId, int trajectoryId) |
| Returns whether a trajectory is near a line segment (partition) More...
|
|
void | ConstructRangeOfTrajectory () |
|
void | MeasureDensityOfLineSegment () |
|
float | MeasureDistanceFromPointToPoint (CMDPoint *point1, CMDPoint *point2) |
|
|
int | m_nTrajectories |
|
int | m_nLineSegments |
|
IntIntPairArray * | m_idArray |
|
FloatMatrix * | m_distanceIndex |
|
FloatArray * | m_lengthArray |
|
float | m_fractionParam |
|
float | m_distanceParam |
|
int | m_nNearTrajectories |
|
IntIntPairArray | m_trajectoryRange |
|
FloatArray | m_densityArray |
|
string | m_densityFilePath |
|
map< IntIntPair, int > * | m_closePartitionArrayIndexMap |
|
IntIntPairMatrix * | m_closePartitionArray |
|
map< IntIntPair, float > * | m_finePartitionLengthMap |
|
map< IntIntPair, int > * | m_coarsePartitionIdMap |
|
Handles partition outlier computation.
Used by OutlierDetector to handle the actual distance comparisions to find outlying partitions. The comparisions and finding of partition outliers are done here, while a lot of the management and higher-level functionality (finding and cataloging outlying trajectories, pruning optimization, etc.) are handled in COutlierDetector.
CDistanceOutlier::CDistanceOutlier |
( |
int |
nTrajectories, |
|
|
int |
nLineSegments, |
|
|
IntIntPairArray * |
idArray, |
|
|
FloatMatrix * |
distanceIndex |
|
) |
| |
Constructor.
- Parameters
-
[in] | nTrajectories | the number of trajectories in the dataset |
[in] | nLineSegments | the number of line segments (partitions) in the dataset |
[in] | idArray | an array that maps each partition (partition ID as the index of the array) to the ID of the trajectory it belongs to |
[in] | distanceIndex | the matrix of distances between partitions |
bool CDistanceOutlier::DetectOutlyingLineSegment |
( |
vector< bool > * |
result | ) |
|
Determines if any of the partitions are outlying or not.
This method is the real workhorse behind the outlier detection - it performs the actual distance comparisions to check if a partition is an outlier or not.
- Parameters
-
[out] | result | flags for each partition denoting whether they are outlying or not |
- Returns
- Successful or not.
int CDistanceOutlier::GetNumOfNearTrajectories |
( |
int |
index | ) |
|
|
private |
Returns the number of trajectories that are close to the line segment.
- Parameters
-
[in] | index | the ID of the line segment (partition) |
- Returns
- the number of close trajectories
bool CDistanceOutlier::IsTrajectoryNear |
( |
int |
lineSegmentId, |
|
|
int |
trajectoryId |
|
) |
| |
|
private |
Returns whether a trajectory is near a line segment (partition)
- Parameters
-
[in] | lineSegmentId | the ID of the partition |
[in] | trajectoryId | the ID of the trajectory |
- Returns
- true if the trajectory and partition are close, false if they are not
The documentation for this class was generated from the following files: