SourceForge.net Logo timeSeries: timeSeries Class Library

state Class Reference
[Data segmentation]

a state is a portion of a stateFlag, usually defined as occuring between two transitions More...

#include <state.h>

List of all members.

Public Member Functions

 state (int i0=0, int i1=0)
int begin () const
 returns the beginning index
int end () const
 returns the ending index
stateextend (int i)
stateprepend (int i)
int length () const
bool contains (int i) const

Detailed Description

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.

Examples:

campVIRTTEXAnalysis.cpp, hmi04.cpp, and hmi04.h.


Constructor & Destructor Documentation

state::state ( int  i0 = 0,
int  i1 = 0 
) [inline]

state constructor

Parameters:
i0 an integer corresponding to the beginning index
i1 an integer corresonding to the ending index

Member Function Documentation

bool state::contains ( int  i  )  const [inline]

tests whether a sample is wholly contained within a state

Parameters:
i sample number
Returns:
returns a true if i is contained in the state
state& state::extend ( int  i  )  [inline]

extend the end of a state

Parameters:
i the number of points by which to extend the state
Returns:
returns a state with the ending point extended by i samples
Examples:
hmi04.cpp.
int state::length (  )  const [inline]

length of a state

Returns:
returns the number of samples contained in the state
state& state::prepend ( int  i  )  [inline]

extend the beginning of a state

Parameters:
i the number of points by which to shift the beginning of the state
Returns:
returns a state with the ending point shifted earlier by i samples
Generated on Tue Mar 16 15:10:52 2010 for timeSeries by  doxygen 1.6.3