SourceForge.net Logo timeSeries: timeSeries Class Library

stateFlag Class Reference
[Data segmentation]

an integer timeSeries for temporal segmentation of experimental data More...

#include <stateFlag.h>

Inherits timeSeries< int >.

Collaboration diagram for stateFlag:
Collaboration graph
[legend]

List of all members.

Classes

class  iterator
 iterates over edges in a stateFlag More...

Public Member Functions

 stateFlag (std::string varnam, dataFile &df)
template<class T >
 stateFlag (const char *vn, const char *sn, timeSeries< T > &ts)
template<class T >
 stateFlag (const timeSeries< T > ts)
stateFlag range (int beg, int end)
stateFlag range (double t0, double tf)
stateFlag range (state &s)
std::vector< int > rising () const
std::vector< int > falling () const
std::vector< statefindStates (const transition &tbegin, const transition &tend) const
std::vector< statefindStates () const
template<class C >
iterator< C > begin ()
template<class C >
iterator< C > end ()

Friends

class timeSeries

Detailed Description

an integer timeSeries for temporal segmentation of experimental data

A stateFlag object contains discrete data that is used to delineate specific sections of a experiment for analysis.

See the main documentation page for detailed information about how to use the stateFlag class.

Examples:

camp_utilities.h, campVIRTTEXAnalysis.cpp, hmi04.cpp, hmi04.h, hmi04_utilities.cpp, and hmi04_utilities.h.


Constructor & Destructor Documentation

stateFlag::stateFlag ( std::string  varnam,
dataFile df 
) [inline]

stateFlag constructor

Parameters:
varnam a string that selects the field contained in the dataFile containing the stateFlag
df a dataFile object that contains the data on which the stateFlag will be based

The named field must be an integer or an exception (BadType) will occur at runtime

Exceptions:
BadType 
template<class T >
stateFlag::stateFlag ( const char *  vn,
const char *  sn,
timeSeries< T > &  ts 
) [inline]

stateFlag constructor

Parameters:
vn a variable name to be associated with the stateFlag
sn a "short" variable name associated with the stateFlag. This field is not currently used by any of the stateFlag member functions
ts the timeSeries object from which the stateFlag will be derived
template<class T >
stateFlag::stateFlag ( const timeSeries< T >  ts  )  [inline]

stateFlag constructor

Parameters:
ts the timeSeries object from which the stateFlag will be derived

In this form of the constructor, the stateFlag names are implicitly generated from the existing timeSeries names by appending "<FLAG>" or "<F>" for the long name and short name respectively.


Member Function Documentation

template<class C >
iterator<C> stateFlag::begin (  )  [inline]

first edge

Returns:
returns a stateFlag::iterator that points the first edge in stateFlag that matches the edge comparator C
Examples:
campVIRTTEXAnalysis.cpp, and hmi04.cpp.
template<class C >
iterator<C> stateFlag::end (  )  [inline]

last edge

Returns:
returns a stateFlag::iterator that points the last edge in stateFlag that matches the edge comparator C
Examples:
campVIRTTEXAnalysis.cpp, and hmi04.cpp.
std::vector<int> stateFlag::falling (  )  const [inline]

find location of falling edges

Returns:
returns a vector of int's containing the location of every falling edge
std::vector<state> stateFlag::findStates (  )  const [inline]

find states contained within a stateFlag object

Returns:
returns a vector of states contained within the stateFlag that begin with a rising edge and end with a falling edge
std::vector<state> stateFlag::findStates ( const transition tbegin,
const transition tend 
) const [inline]

find states contained within a stateFlag object

Parameters:
tbegin a transition object that matches the beginning of the state
tend a transition object that matches the end of the state
Returns:
returns a vector of states contained within the stateFlag that begin with transition tbegin and end with transition tend
Examples:
hmi04.cpp.
stateFlag stateFlag::range ( state s  )  [inline]
Parameters:
s state
Returns:
a timeSeries object formed from the subrange defined by the state s

States are simply pairs of indices that define a region. They usually arise from searches on stateFlag objects. Subranges are created by reference. No data is copied or moved.

Reimplemented from timeSeries< int >.

stateFlag stateFlag::range ( double  t0,
double  tf 
) [inline]
Parameters:
t0 begining time
tf ending time
Returns:
a timeSeries object corresponding approximately to the range [t0,tf]. If t0 or tf do not correspond exactly to a sample time, the nearest sample is used.

Subranges are created by reference. No data is copied or moved.

Reimplemented from timeSeries< int >.

stateFlag stateFlag::range ( int  j,
int  k 
) [inline]
Parameters:
j begining sample
k ending sample
Returns:
a timeSeries object corresponding to the range [j,k]

Subranges are created by reference. No data is copied or moved.

Reimplemented from timeSeries< int >.

Examples:
hmi04.cpp.
std::vector<int> stateFlag::rising (  )  const [inline]

find location of rising edges

Returns:
returns a vector of int's containing the location of every rising edge
Examples:
hmi04.cpp.
Generated on Tue Mar 16 15:10:52 2010 for timeSeries by  doxygen 1.6.3