Ordered Value Associated to a Identifier. More...

#include <rmaxvalue.h>

Collaboration diagram for RMaxValue:
[legend]

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
 
RMaxValueoperator= (const RMaxValue &val)
 
RMaxValueoperator= (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.

RMaxValue ( const RMaxValue val)

Copy constructor.

Parameters
valOriginal value.
RMaxValue ( size_t  id)
explicit

Construct a default value.

Parameters
idIdentifier.
RMaxValue ( size_t  id,
double  val 
)

Construct a value.

Parameters
idIdentifier.
valValue.
virtual ~RMaxValue ( void  )
virtual

Destruct the object.

Member Function Documentation

int Compare ( const RMaxValue obj) const

Comparison function.

Parameters
objValue to compare with.
int Compare ( double  val) const

Comparison function.

Parameters
valValue 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 RMaxValue val)

Assignment operator.

Parameters
valValue to assign.
RMaxValue& operator= ( const double  val)

Assignment operator.

Parameters
valValue 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

const RMaxValue Null
static

Represent a null value and an undefined identifier.

size_t Id

The identifier of the value.

double Value

Value.