Trajectory Outlier Detection Library
 All Classes Functions Variables Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
TrajData Class Reference

The main class, and handler for all of the trajectory data. More...

#include <TrajData.h>

Public Member Functions

 TrajData ()
 Default constructor. Uses the fraction parameter p and the distance parameter D specified in params.h.
 
bool readFile (string)
 Read trajectories from an input .traj file. More...
 
void OutputTrajectoryPlot (string)
 Output an eps image of the trajectories and outliers. More...
 
void OutputTrajectoryPlotPNG (string filePath)
 Output a png image of the trajectories and outliers. More...
 
void OutputTrajectoryPlot (string filePath, string termSettings, string oTrajColor, int oTrajWidth, string oPartColor, int oPartWidth)
 Output an eps image of the trajectories and outliers. More...
 

Public Attributes

std::string m_inputFilePath
 The path of the input file.
 
int m_nDimensions
 The dimensionality of the dataset (typically 2)
 
int m_nTrajectories
 The number of trajectories in the dataset.
 
int m_nOutliers
 The number of outliers found.
 
int m_nOutlyingPartitions
 The outlying partitions found.
 
std::vector< CTrajectory * > m_trajectoryList
 The list of trajectories.
 
std::list< COutlier * > m_outlierList
 The list of outliers.
 
float m_paramFraction
 The parameter p (fraction of trajectories that must be not close to be an outlier)
 
float m_paramDistance
 The distance parameter D.
 
int m_nLineSegments
 The number of line segments in the original data.
 
int m_nTrajectoryPartitions
 The number of trajectory partitions.
 

Private Attributes

int m_maxNPoints
 The maximum number of points to read in.
 

Detailed Description

The main class, and handler for all of the trajectory data.

The main purpose of this class is to hold the trajectory data. Contains functions to read in trajectory data and output images. After outlier detection is run this class also holds information on the outlying trajectories and outlying partitions.

Member Function Documentation

void TrajData::OutputTrajectoryPlot ( string  filePath)

Output an eps image of the trajectories and outliers.

Makes a plot of the trajectories with gnuplot and highlights outlying trajectories and partitions. Uses default coloring and line widths: outlier trajectories colored red, line widths 2, and outlier partitions in a line width of 6.

The output file is specified with filePath, which should be an .eps file.

Parameters
filePath[in] The desired path and filename of the eps file to output
void TrajData::OutputTrajectoryPlot ( string  filePath,
string  termSettings,
string  oTrajColor,
int  oTrajWidth,
string  oPartColor,
int  oPartWidth 
)

Output an eps image of the trajectories and outliers.

Makes a plot of the trajectories with gnuplot and highlights outlying trajectories and partitions. The output file is specified with filePath, which should be an eps file.

Parameters
filePath[in] The desired path and filename of the eps file to output
termSettings[in] the terminal settings passed to gnuplot to specify the output type and style. For example, for eps files specify "post eps", for png output specify "pngcairo", etc. Options can be specified afterward, such as "post eps color".
oTrajColor[in] The color for outlying trajectories
oTrajWidth[in] The line width for outlying trajectories
oPartColor[in] The color for outlying partitions
oPartWidth[in] The line width for outlying partitions
void TrajData::OutputTrajectoryPlotPNG ( string  filePath)

Output a png image of the trajectories and outliers.

Makes a plot of the trajectories with gnuplot and highlights outlying trajectories and partitions. Uses default coloring and line widths: outlier trajectories colored red, line widths 2, and outlier partitions in a line width of 6.

The output file is specified with filePath, which should be an .png file.

Parameters
filePath[in] The desired path and filename of the png file to output
bool TrajData::readFile ( string  filePath)

Read trajectories from an input .traj file.

Parameters
[in]filePathThe path to the input .traj file
Returns
True if read is successful

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