- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Executives::DeductiveController::Observation::DiscreteValue Class Reference

`#include <DiscreteValue.h>`

Inheritance diagram for Mers::Executives::DeductiveController::Observation::DiscreteValue:

[legend]
Collaboration diagram for Mers::Executives::DeductiveController::Observation::DiscreteValue:

[legend]
List of all members.

## Public Member Functions
| DiscreteValue (DiscreteVariable *variable, const char *name, double lower, double upper, DiscreteValue *next=NULL)
virtual | ~DiscreteValue ()
DiscreteValue * | getNext () const
bool | isInRange (double value) const
## Protected Attributes
DiscreteValue * | m_next
| A pointer to the next value in the conversion list.
double | m_lowerBound
| The lower bound of this object.
double | m_upperBound
| The upper bound of this object.

## Detailed Description

This class stores the information necessary to discretize a single continuous value within the specified range of this value.

Author:
  Paul Elliott

Definition at line 31 of file DiscreteValue.h.

## Constructor & Destructor Documentation

DiscreteValue::DiscreteValue | ( | DiscreteVariable * | variable,
|  | const char * | name,
|  | double | lower,
|  | double | upper,
|  | DiscreteValue * | next = `NULL` |
| ) |  |  |

Constructs a new named discrete value, with a discretization range.

Parameters:

  | variable | The discrete variable that this value belongs to.
  | name | The name of the value.
  | lower | The lower bound of the discretization. The continuous variable's value is >= this value.
  | upper | The upper bound of the discretization. The coninuous variable's value is < this value.
  | next | A pointer to the next DiscreteValue in the conversion chain.

Definition at line 21 of file DiscreteValue.cpp.

References Mers::Utils::Lang::ReferencedObject::addReference(), and m_next.

Here is the call graph for this function:

DiscreteValue::~DiscreteValue | ( |  | ) | `[virtual]`

Destroys this object.

Reimplemented from Mers::Interfaces::DiscreteValue.

Definition at line 32 of file DiscreteValue.cpp.

References m_next, and Mers::Utils::Lang::ReferencedObject::removeReference().

Here is the call graph for this function:

## Member Function Documentation

DiscreteValue* Mers::Executives::DeductiveController::Observation::DiscreteValue::getNext | ( |  | ) | const`[inline]`

Returns the next value for conversion.

Definition at line 63 of file DiscreteValue.h.

References m_next.

Referenced by Mers::Executives::DeductiveController::Observation::DiscreteVariable::getValue(), and Mers::Executives::DeductiveController::Observation::DiscreteVariable::setValues().

bool Mers::Executives::DeductiveController::Observation::DiscreteValue::isInRange | ( | double | value | ) | const`[inline]`

Returns true if the specified continuous value lies within the discretization range of this discrete value. Thus, it returns true iff lower <= value < upper.

Parameters:

  | value | The value that is to be checked against this object's range.

Definition at line 75 of file DiscreteValue.h.

References m_lowerBound, and m_upperBound.

Referenced by Mers::Executives::DeductiveController::Observation::DiscreteVariable::getValue().

The documentation for this class was generated from the following files:

- /Users/fpy/titan-1-5-MBARI/Mers/Executives/DeductiveController/Observation/DiscreteValue.h
- /Users/fpy/titan-1-5-MBARI/Mers/Executives/DeductiveController/Observation/DiscreteValue.cpp