EPANET-RTX  1.1
real-time extension for the EPANET toolkit
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
RTX::TimeSeries Class Reference

An abstraction of Points ordered in time. More...

#include <TimeSeries.h>

Inheritance diagram for RTX::TimeSeries:
[legend]
Collaboration diagram for RTX::TimeSeries:
[legend]

Classes

class  Statistics
 A summary of a collection of points. More...
 

Public Types

typedef boost::shared_ptr
< TimeSeries
sharedPointer
 

Public Member Functions

virtual void insert (Point aPoint)
 
virtual void insertPoints (std::vector< Point >)
 
virtual Point point (time_t time)
 option to add lots of (un)ordered points all at once. More...
 
virtual Point pointBefore (time_t time)
 
virtual Point pointAfter (time_t time)
 
virtual Point pointAtOrBefore (time_t time)
 
virtual Point interpolatedPoint (time_t time)
 
virtual std::vector< Pointpoints (time_t start, time_t end)
 Get a vector of Points within a specific time range. More...
 
virtual std::pair< Point, PointadjacentPoints (time_t time)
 
virtual time_t period ()
 
virtual std::string name ()
 1/frequency (# seconds between data points)
 
PointRecord::sharedPointer record ()
 
TimeSeries::Statistics summary (time_t start, time_t end)
 
TimeSeries::Statistics gapsSummary (time_t start, time_t end)
 
std::vector< Pointgaps (time_t start, time_t end)
 
virtual TimeSeries::sharedPointer rootTimeSeries ()
 
virtual void setName (const std::string &name)
 
void setRecord (PointRecord::sharedPointer record)
 
virtual void resetCache ()
 
virtual void setClock (Clock::sharedPointer clock)
 
Clock::sharedPointer clock ()
 
virtual void setUnits (Units newUnits)
 
Units units ()
 
void setFirstTime (time_t time)
 
void setLastTime (time_t time)
 
time_t firstTime ()
 
time_t lastTime ()
 
virtual std::ostream & toStream (std::ostream &stream)
 

Protected Member Functions

virtual bool isCompatibleWith (TimeSeries::sharedPointer withTimeSeries)
 

Detailed Description

An abstraction of Points ordered in time.

The base TimeSeries class doesn't do much. Derive for added flavor.

Member Function Documentation

Point RTX::TimeSeries::point ( time_t  time)
virtual

option to add lots of (un)ordered points all at once.

Get a Point at a specific time.

Parameters
timeThe requested time.
Returns
The requested Point, or the Point just prior to the passed time value.
See also
Point

Reimplemented in RTX::ModularTimeSeries, RTX::AggregatorTimeSeries, RTX::CurveFunction, RTX::RunTimeStatusModularTimeSeries, RTX::Resampler, RTX::TimeOffsetTimeSeries, RTX::SineTimeSeries, RTX::ConstantTimeSeries, and RTX::SinglePointFilterModularTimeSeries.

std::vector< Point > RTX::TimeSeries::points ( time_t  start,
time_t  end 
)
virtual

Get a vector of Points within a specific time range.

Parameters
startThe beginning of the requested time range.
endThe end of the requested time range.
Returns
The requested Points (as a vector)

The base class provides some brute-force logic to retrieve points, by calling Point() repeatedly. For more efficient access, you may wish to override this method.

See also
Point

Reimplemented in RTX::ModularTimeSeries.


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