smp::state_array_double< NUM_STATES > Class Template Reference

Implementation of the state data structure as a double array. More...

#include <state_array_double.h>

List of all members.

Public Member Functions

 state_array_double (const state_array_double< NUM_STATES > &state_in)
 Copy constructor.
const state_array_double
< NUM_STATES > & 
operator= (const state_array_double< NUM_STATES > &state_in)
 Equality operator.
double & operator[] (int index_in)
 The bracket operator that returns the given element from the array.

Public Attributes

double state_vars [NUM_STATES]
 State variables array.

Detailed Description

template<int NUM_STATES>
class smp::state_array_double< NUM_STATES >

Implementation of the state data structure as a double array.

This class implements the state data structure as a double array. The dimension of the array is a template parameter to the class.


Member Function Documentation

template<int NUM_STATES>
const state_array_double<NUM_STATES>& smp::state_array_double< NUM_STATES >::operator= ( const state_array_double< NUM_STATES > &  state_in)

Equality operator.

Two states are equal if and only if all their components are equal. This function checks whether this criterion is satisfied.

template<int NUM_STATES>
double& smp::state_array_double< NUM_STATES >::operator[] ( int  index_in) [inline]

The bracket operator that returns the given element from the array.

The bracket operator returns a reference to the indexed element in the array.

Parameters:
index_inThe index of the state variable.
Returns:
Returns a reference to the state variable with index index_in.

Member Data Documentation

template<int NUM_STATES>
double smp::state_array_double< NUM_STATES >::state_vars[NUM_STATES]

State variables array.

The implementation of the state variables as a double array of size NUM_INPUTS, which is the template argument for this class.


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