#include <FixLenTimeSeries.h>
Public Types | |
enum | Error { OUT_OF_RANGE, EMPTY_TIME_SERIES } |
The exception type used for this class. More... | |
Public Member Functions | |
FixLenTimeSeries () | |
Default constructor. | |
FixLenTimeSeries (int32 numberOfSamples) throw ( Error ) | |
Constructs a new FixLenTimeSeries with given number of samples. | |
FixLenTimeSeries (const FixLenTimeSeries &flts) | |
Copy constructor. | |
FixLenTimeSeries & | operator= (const FixLenTimeSeries &flts) |
Assignment constructor. | |
~FixLenTimeSeries () | |
Destructs a FixLenTimeSeries. | |
int32 | getNumberOfSamples () const |
Returns the number of samples. | |
double | getSample (int32 i=0) const throw ( Error ) |
Returns the ith sample. | |
double & | getSample (int32 i=0) throw ( Error ) |
Returns the handle of the ith sample. | |
double | getAverage (double p_old=0, double p_new=0) const throw ( Error ) |
Returns the average value form positon p_old to p_new. | |
void | addSample (double sample) |
Adds a sample to this FixLenTimeSeries. | |
Static Public Member Functions | |
FixLenTimeSeries | resampleFixLenTimeSeries (const FixLenTimeSeries &s, int32 n, double k, double ip) throw ( FixLenTimeSeries::Error ) |
Create a copy of an given FixLenTimeSeries based on the given parameter. | |
Friends | |
ostream & | operator<< (ostream &os, const FixLenTimeSeries &flts) |
output the FixLenTimeSeries |
|
The exception type used for this class.
|
|
Default constructor.
|
|
Constructs a new FixLenTimeSeries with given number of samples. All samples are initialized to 0.
|
|
Copy constructor.
|
|
Destructs a FixLenTimeSeries.
|
|
Adds a sample to this FixLenTimeSeries.
|
|
Returns the average value form positon p_old to p_new. If p_old = 0 and p_new = 0, then the average value of all samples are returned. Note that p_old and p_new are real numbers. p_old is usually larger than p_new
|
|
Returns the number of samples.
|
|
Returns the handle of the ith sample. By default, the latest sample is returned.
|
|
Returns the ith sample. The samples are indexed by 0 to the number of samples minus one. The 0th sample is the latest sample. By default, the latest sample is returned.
|
|
Assignment constructor.
|
|
Create a copy of an given FixLenTimeSeries based on the given parameter.
|
|
output the FixLenTimeSeries
|