#include <ProximityMeasure.h>
Inheritance diagram for prapi::ProximityModifier< operation, T >:

This modifier may be used to perform calculations on proximity values in a general way. Stl functionals (plus,minus,multiplies,divides) are used to indicate the performed operations. ProximityModifiers can be used as any proximity measure - they just modify the value returned by their internal proximity measure in a certain way.
Example:
//Create a proximity modifier that adds 1.0 to the Euclidean distance between samples ProximityModifier<plus<double>,double> adder(new EuclideanDistance<double>, 1.0); //Create a proximity modifier that divides the Euclidean distance between samples by two ProximityModifier<divides<double>,double> adder(new EuclideanDistance<double>, 2.0);
Public Methods | |
| ProximityModifier (ProximityMeasure< T > *measure, double value) | |
| Create a new modifier that uses the given proximity measure. | |
| ProximityModifier (ProximityMeasure< T > &measure, double value) | |
| Create a new modifier that uses the given proximity measure. | |
| virtual | ~ProximityModifier () |
| double | getProximity (const util::List< T > &sample, const util::List< T > &model, double stopAfter) const throw (ProximityException&) |
| Proximity between two lists. | |
|
||||||||||||||||
|
Create a new modifier that uses the given proximity measure. Note that if you use this constructor, the memory pointed by measure is automatically released upon the deletion of the modifier.
|
|
||||||||||||||||
|
Create a new modifier that uses the given proximity measure.
|
|
||||||||||||||||||||
|
Proximity between two lists.
Implements prapi::ProximityMeasure< T >. |