Sleipnir
|
Inverts an underlying measure by negating its result. More...
#include <measure.h>
Public Member Functions | |
CMeasureNegate (const IMeasure *pMeasure, bool fMemory) | |
Construct a new negation 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 negating its result.
Sleipnir::CMeasureNegate::CMeasureNegate | ( | const IMeasure * | pMeasure, |
bool | fMemory | ||
) | [inline] |
Construct a new negation measure wrapping the given underlying measure.
pMeasure | Measure whose result should be negated. |
fMemory | If true, the new negation measure is responsible for releasing the underlying measure's memory. |
Definition at line 227 of file measure.h.
Referenced by Clone().
IMeasure* Sleipnir::CMeasureNegate::Clone | ( | ) | const [inline, virtual] |
Create a copy of the current measure object.
Implements Sleipnir::IMeasure.
Definition at line 237 of file measure.h.
References Sleipnir::IMeasure::Clone(), and CMeasureNegate().
const char* Sleipnir::CMeasureNegate::GetName | ( | ) | const [inline, virtual] |
Return the human-readable unique identifier of the measure type.
Implements Sleipnir::IMeasure.
Definition at line 229 of file measure.h.
References Sleipnir::IMeasure::GetName().
bool Sleipnir::CMeasureNegate::IsRank | ( | ) | const [inline, virtual] |
Return true if the measure requires rank-based integer inputs.
Implements Sleipnir::IMeasure.
Definition at line 233 of file measure.h.
References Sleipnir::IMeasure::IsRank().
double Sleipnir::CMeasureNegate::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 241 of file measure.h.
References Sleipnir::IMeasure::Measure().