Gaia
gaia2::CrossSegmentDistance Class Reference

This class calculates a distance between segments from two points. More...

#include <crosssegmentdistance.h>

Inheritance diagram for gaia2::CrossSegmentDistance:
gaia2::DistanceFunction

Public Member Functions

 CrossSegmentDistance (const PointLayout &layout, const ParameterMap &params)
 
Real operator() (const Point &p1, const Point &p2, int seg1, int seg2) const
 This function computes the distance between the two given points. More...
 
- Public Member Functions inherited from gaia2::DistanceFunction
 DistanceFunction (const PointLayout &layout, const ParameterMap &params)
 
const PointLayoutlayout () const
 
const RegioncheckFixedLength (const Region &region) const
 Checks that the given Region only contains fixed-length descriptors and throws an exception if not. More...
 

Protected Attributes

DistanceFunction_dist
 
DistAggr_aggr1
 
DistAggr_aggr2
 
- Protected Attributes inherited from gaia2::DistanceFunction
PointLayout _layout
 
ParameterMap _params
 
Region _region
 

Additional Inherited Members

- Public Attributes inherited from gaia2::DistanceFunction
QString name
 Name for the metric, usually the key that was used to instantiate it from the factory.
 
QStringList validParams
 List of valid parameters this analyzer accepts. More...
 

Detailed Description

This class calculates a distance between segments from two points.

The function used to calculate the distance between two segments is given by the distance parameter. What it does is the following:

  • for a given segment of p1, it computes its distance with all the segments of p2, then uses func1 to aggregate the results.
  • it does the previous for all segments of p1, then uses func2 to aggregate the results.

WARNING: this metric is not final, and it might change its behavior in the future.

Parameters
distancethe name of the distance to be composed with.
paramsthe parameters for creating the distance.
func1the first aggregation function (min, max or mean).
func2the second aggregation function (min, max or mean).

Member Function Documentation

Real CrossSegmentDistance::operator() ( const Point p1,
const Point p2,
int  seg1,
int  seg2 
) const
virtual

This function computes the distance between the two given points.

It needs to be implemented in each subclass. It takes as optional arguments the number of the segments on which to operate.

Implements gaia2::DistanceFunction.


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