Gaia
|
#include <distancefunction.h>
Public Member Functions | |
DistanceFunction (const PointLayout &layout, const ParameterMap ¶ms) | |
virtual Real | operator() (const Point &p1, const Point &p2, int seg1=0, int seg2=0) const =0 |
This function computes the distance between the two given points. More... | |
const PointLayout & | layout () const |
const Region & | checkFixedLength (const Region ®ion) const |
Checks that the given Region only contains fixed-length descriptors and throws an exception if not. More... | |
Public Attributes | |
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... | |
Protected Attributes | |
PointLayout | _layout |
ParameterMap | _params |
Region | _region |
Checks that the given Region only contains fixed-length descriptors and throws an exception if not.
GaiaException | if the region contained variable-length descriptors. |
References gaia2::Region::isLengthTypeOnlyFrom().
|
pure 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.
Implemented in gaia2::CrossSegmentDistance, gaia2::LinearCombinationDistance, gaia2::CosineAngleDistance, gaia2::ResistorAverageDistance, gaia2::SummedSegmentDistance, gaia2::CosineSimilarity, gaia2::ForceIdentityDistance, gaia2::SemanticClassifierDistance, gaia2::BPFDistance, gaia2::ExponentialCompressDistance, gaia2::KeyDistance, gaia2::EuclideanDistance, gaia2::ManhattanDistance, gaia2::RhythmDistance, gaia2::KullbackLeiblerDistance, gaia2::RandomDistance, gaia2::MinkowskiDistance, gaia2::WeightedEuclideanDistance, gaia2::WeightedPearsonDistance, and gaia2::NullDistance.
QStringList gaia2::DistanceFunction::validParams |
List of valid parameters this analyzer accepts.
It needs to be filled in the constructor of the derived analyzer, and will be checked by the factory just after instantiation.