Ordered Value Associated to a Identifier. More...
#include <rmaxvalue.h>
Collaboration diagram for RMaxValue:
Public Member Functions | |
int | Compare (const RMaxValue &obj) const |
int | Compare (double val) const |
int | Compare (size_t id) const |
size_t | GetId (void) const |
double | GetValue (void) const |
operator double () const | |
RMaxValue & | operator= (const RMaxValue &val) |
RMaxValue & | operator= (const double val) |
RMaxValue (void) | |
RMaxValue (const RMaxValue &val) | |
RMaxValue (size_t id) | |
RMaxValue (size_t id, double val) | |
virtual | ~RMaxValue (void) |
Public Attributes | |
size_t | Id |
double | Value |
Static Public Attributes | |
static const RMaxValue | Null |
Detailed Description
Ordered Value Associated to a Identifier.
The RMaxValue class provides an association of an identifier and a value order by ascending or descending order of values.
Constructor & Destructor Documentation
RMaxValue | ( | void | ) |
Default constructor. The identifier is set to cNoRef and the value to NAN.
|
explicit |
Construct a default value.
- Parameters
-
id Identifier.
RMaxValue | ( | size_t | id, |
double | val | ||
) |
Construct a value.
- Parameters
-
id Identifier. val Value.
|
virtual |
Destruct the object.
Member Function Documentation
int Compare | ( | const RMaxValue & | obj | ) | const |
Comparison function.
- Parameters
-
obj Value to compare with.
int Compare | ( | double | val | ) | const |
Comparison function.
- Parameters
-
val Value to compare with.
int Compare | ( | size_t | id | ) | const |
Compare the identifier of the sparse ordered vector with a given identifier. param id Identifier to compare with.
RMaxValue& operator= | ( | const double | val | ) |
Assignment operator.
- Parameters
-
val Value to assign.
operator double | ( | ) | const |
Automatic conversion to a double (const version).
double GetValue | ( | void | ) | const |
Get the value.
size_t GetId | ( | void | ) | const |
Get the identifier.
Member Data Documentation
|
static |
Represent a null value and an undefined identifier.
size_t Id |
The identifier of the value.
double Value |
Value.