Class GMMTMap

Inheritance Relationships

Base Type

Class Documentation

class GMMTMap : public MoD::Base

Public Functions

inline explicit GMMTMap(const std::string &fileName)

Constructor that reads a GMMTMap from an xml file.

Parameters:

fileName – Filename of XML file.

void readFromXML(const std::string &fileName)

Read a GMMTMap from an xml file.

Parameters:

fileName – Filename of XML file.

void computeHeadingAndConstructRTree()

Prepares the Boost RTree and computes all headings as well.

std::vector<TreeValue> getNearestNeighbors(double x, double y) const

Computes closest points (within a radius of @stddev_) from each motion pattern.

Parameters:
  • x – The x coordinate of the position for which the query needs to be done.

  • y – The y coordinate of the position for which the query needs to be done.

Returns:

Closest points with their cluster_id and ‘k’.

inline std::vector<TreeValue> operator()(double x, double y) const
inline int getM() const

Get the number of motion patterns in this GMMT-map.

Returns:

The number of motion patterns.

inline int getK() const

Get the number of Gaussians in each motion pattern.

Returns:

The number of Gaussians.

inline double getStdDev() const

Get the standard deviation of each Gaussian.

Returns:

The standard deviation.

inline double getMixingFactorByClusterID(size_t cluster_idx)

Get the mixing factor for a certain cluster index.

Parameters:

cluster_id – The index of the cluster.

Returns:

The mixing factor for that cluster.

inline double getHeadingAtDist(size_t cluster_idx, size_t mean_idx)

Protected Attributes

int M_

The number of motion patterns in the GMM Trajectory Map.

int K_

The number of Gaussians per motion pattern in the GMM Trajectory Map.

double stddev_

The standard deviation used in the GMM Trajectory Map. The 2D Gaussians in each motion pattern are circular.

std::vector<GMMTMapCluster> clusters_

A vector containing all the clusters (motion patterns).

bgi::rtree<TreeValue, bgi::quadratic<16>> rtree_

A tree used for.