Gaia
|
This class computes the cosine similarity of a given Region. More...
#include <cosinesimilarity.h>
Public Member Functions | |
CosineSimilarity (const PointLayout &layout, const ParameterMap ¶ms) | |
Real | operator() (const Point &p1, const Point &p2, int seg1, int seg2) const |
This function computes the distance between the two given points. More... | |
![]() | |
DistanceFunction (const PointLayout &layout, const ParameterMap ¶ms) | |
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... | |
Protected Attributes | |
bool | _useDefaultValue |
Real | _defaultValue |
![]() | |
PointLayout | _layout |
ParameterMap | _params |
Region | _region |
Additional Inherited Members | |
![]() | |
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... | |
This class computes the cosine similarity of a given Region.
descriptorNames | the names of the descriptors to be included in the computation of the distance. Only accepts real descriptors, can use wildcards. |
except | the names of the descriptors to be removed from the selected list specified before. Can use wildcards. |
defaultValue | when 1 of the 2 points is null, then the similarity is not defined. If defaultValue is given, then it will be returned, otherwise an exception will be thrown. |
|
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.
References gaia2::clip(), and gaia2::Point::name().