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

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

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

`#include <DiscreteVariable.h>`

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

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

[legend]
List of all members.

## Public Member Functions
| DiscreteVariable (const char *name)
virtual | ~DiscreteVariable ()
void | setValues (DiscreteValue *values)
DiscreteValue * | getValue (double value) const
## Protected Attributes
DiscreteValue * | m_values

## 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 DiscreteVariable.h.

## Constructor & Destructor Documentation

DiscreteVariable::DiscreteVariable | ( | const char * | name | ) |

Constructs a new named discrete variable, suitable for discretization.

Parameters:

  | name | The name of the variable.

Reimplemented from Mers::Interfaces::DiscreteVariable.

Definition at line 24 of file DiscreteVariable.cpp.

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

Destroys this object.

Reimplemented from Mers::Interfaces::DiscreteVariable.

Definition at line 32 of file DiscreteVariable.cpp.

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

Here is the call graph for this function:

## Member Function Documentation

void DiscreteVariable::setValues | ( | DiscreteValue * | values | ) |

Sets the list of values that can be used to discretize this variable into a set of values. Note that this list should have the invariant that all of their parent variables are this object.

Parameters:

  | values | The first value in the linked list of all values of this variable (discrete).

Definition at line 41 of file DiscreteVariable.cpp.

References Mers::Utils::Lang::ReferencedObject::addReference(), Mers::Executives::DeductiveController::Observation::DiscreteValue::getNext(), m_values, and Mers::Utils::Lang::ReferencedObject::removeReference().

Here is the call graph for this function:

DiscreteValue * DiscreteVariable::getValue | ( | double | value | ) | const

Returns the value associated with the specified discrete value, looking up the value in the current list of values. Returns NULL if a value could not be found.

Parameters:

  | value | The continuous value being discretized.

Definition at line 70 of file DiscreteVariable.cpp.

References Mers::Executives::DeductiveController::Observation::DiscreteValue::getNext(), Mers::Executives::DeductiveController::Observation::DiscreteValue::isInRange(), and m_values.

Here is the call graph for this function:

## Member Data Documentation

DiscreteValue* Mers::Executives::DeductiveController::Observation::DiscreteVariable::m_values`[protected]`

The first element of the linked list of values that discretize this object.

Definition at line 71 of file DiscreteVariable.h.

Referenced by getValue(), setValues(), and ~DiscreteVariable().

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

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