Sleipnir
|
Inverts an underlying measure by inverting its result (dividing one by the value). More...
#include <measure.h>
Public Member Functions | |
CMeasureInvert (const IMeasure *pMeasure, bool fMemory) | |
Construct a new inversion measure wrapping the given underlying measure. | |
const char * | GetName () const |
Return the human-readable unique identifier of the measure type. | |
bool | IsRank () const |
Return true if the measure requires rank-based integer inputs. | |
IMeasure * | Clone () const |
Create a copy of the current measure object. | |
double | Measure (const float *adX, size_t iM, const float *adY, size_t iN, EMap eMap, const float *adWX, const float *adWY) const |
Calculate the measure between two given vectors with optional element weights. |
Inverts an underlying measure by inverting its result (dividing one by the value).
Sleipnir::CMeasureInvert::CMeasureInvert | ( | const IMeasure * | pMeasure, |
bool | fMemory | ||
) | [inline] |
Construct a new inversion measure wrapping the given underlying measure.
pMeasure | Measure whose result should be inverted. |
fMemory | If true, the new inversion measure is responsible for releasing the underlying measure's memory. |
Definition at line 270 of file measure.h.
Referenced by Clone().
IMeasure* Sleipnir::CMeasureInvert::Clone | ( | ) | const [inline, virtual] |
Create a copy of the current measure object.
Implements Sleipnir::IMeasure.
Definition at line 280 of file measure.h.
References Sleipnir::IMeasure::Clone(), and CMeasureInvert().
const char* Sleipnir::CMeasureInvert::GetName | ( | ) | const [inline, virtual] |
Return the human-readable unique identifier of the measure type.
Implements Sleipnir::IMeasure.
Definition at line 272 of file measure.h.
References Sleipnir::IMeasure::GetName().
bool Sleipnir::CMeasureInvert::IsRank | ( | ) | const [inline, virtual] |
Return true if the measure requires rank-based integer inputs.
Implements Sleipnir::IMeasure.
Definition at line 276 of file measure.h.
References Sleipnir::IMeasure::IsRank().
double Sleipnir::CMeasureInvert::Measure | ( | const float * | adX, |
size_t | iN, | ||
const float * | adY, | ||
size_t | iM, | ||
EMap | eMap, | ||
const float * | adWX, | ||
const float * | adWY | ||
) | const [inline, virtual] |
Calculate the measure between two given vectors with optional element weights.
adX | First array of values. |
iN | Length of first array. |
adY | Second array of values. |
iM | Length of second array. |
eMap | Way in which returned value should be centered (implementation-specific). |
adWX | If non-null, weights of elements in the first array. |
adWY | If non-null, weights of elements in the second array. |
Implements Sleipnir::IMeasure.
Definition at line 284 of file measure.h.
References Sleipnir::IMeasure::Measure().