Implementation of the state data structure as a double array. More...
#include <state_array_double.h>
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. |
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.
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.
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.
index_in | The index of the state variable. |
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.