a state is a portion of a stateFlag, usually defined as occuring between two transitions More...
#include <state.h>
Public Member Functions | |
state (int i0=0, int i1=0) | |
int | begin () const |
returns the beginning index | |
int | end () const |
returns the ending index | |
state & | extend (int i) |
state & | prepend (int i) |
int | length () const |
bool | contains (int i) const |
a state is a portion of a stateFlag, usually defined as occuring between two transitions
A state denotes a subrange of a stateFlag. It is usually defined as occuring between two transitions but constructors are provided that allow an arbitrary begining and end point to be defined if desired.
Note that a state is not tied to any particular stateFlag or timeSeries. It is simply a way to denote the begining and ending points of a range.
state::state | ( | int | i0 = 0 , |
|
int | i1 = 0 | |||
) | [inline] |
state constructor
i0 | an integer corresponding to the beginning index | |
i1 | an integer corresonding to the ending index |
bool state::contains | ( | int | i | ) | const [inline] |
tests whether a sample is wholly contained within a state
i | sample number |
i
is contained in the state state& state::extend | ( | int | i | ) | [inline] |
extend the end of a state
i | the number of points by which to extend the state |
i
samples int state::length | ( | ) | const [inline] |
length of a state
state& state::prepend | ( | int | i | ) | [inline] |
extend the beginning of a state
i | the number of points by which to shift the beginning of the state |
i
samples