datatypes::timeseries::TTimeSeries¶
A template for univariate, single realisasion time series. More...
#include <time_series.hpp>
Public Types¶
Name | |
---|---|
using T | ElementType The type of each element in this time series. |
Public Functions¶
Name | |
---|---|
bool | IsMissingValue(const T & value) const |
T | GetMissingValue() const |
TTimeSeries(StoragePolicy< T > * storage =nullptr, MissingValuePolicy< T > * mvp =nullptr) | |
TTimeSeries(T default_value, size_t length, const ptime & startDate, const TimeStep & timeStep =TimeStep::GetHourly(), StoragePolicy< T > * storage =nullptr, MissingValuePolicy< T > * mvp =nullptr) | |
TTimeSeries(size_t length, const ptime & startDate, const TimeStep & timeStep =TimeStep::GetHourly(), StoragePolicy< T > * storage =nullptr, MissingValuePolicy< T > * mvp =nullptr) | |
TTimeSeries(const vector< T > & values, const ptime & startDate, const TimeStep & timeStep =TimeStep::GetHourly(), StoragePolicy< T > * storage =nullptr, MissingValuePolicy< T > * mvp =nullptr) | |
TTimeSeries(const T * values, size_t length, const ptime & startDate, const TimeStep & timeStep =TimeStep::GetHourly(), StoragePolicy< T > * storage =nullptr, MissingValuePolicy< T > * mvp =nullptr) | |
TTimeSeries(std::function< T(size_t)> & valueGen, size_t length, const ptime & startDate, const TimeStep & timeStep =TimeStep::GetHourly(), StoragePolicy< T > * storage =nullptr, MissingValuePolicy< T > * mvp =nullptr) | |
TTimeSeries(const TTimeSeries< T > & src) | |
TTimeSeries(const TTimeSeries< T > & src, StoragePolicy< T > * storage) | |
TTimeSeries(const TTimeSeries< T > * src) | |
TTimeSeries(TTimeSeries< T > && src) Constructor using the move semantics. |
|
TTimeSeries< T > & | operator=(TTimeSeries< T > && src) |
TTimeSeries< T > & | operator=(const TTimeSeries< T > & src) |
virtual | ~TTimeSeries() |
T | GetValueNoConst(const size_t & index) |
const T & | GetValueConst(const size_t & index) const |
T | GetValue(const size_t & index) |
const T & | GetValue(const size_t & index) const |
T | GetValueNoConst(const ptime & instant) |
T | GetValue(const ptime & instant) |
const T & | GetValue(const ptime & instant) const |
T | GetLastValue() |
void | CopyTo(T * dest, size_t from =0, size_t to =-1) const |
void | CopyWithMissingValueTo(T * dest, const T & missingValueValue, size_t from =0, size_t to =-1) const |
void | CopyValues(const TTimeSeries< T > & src) |
void | CopyTo(vector< T > & dest, size_t from =0, size_t to =-1) const |
T * | GetValues(size_t from =0, size_t to =std::numeric_limits< size_t >::max()) const |
vector< T > | GetValuesVector(size_t from =0, size_t to =std::numeric_limits< size_t >::max()) const |
TTimeSeries< T > | Subset(size_t from =0, size_t to =std::numeric_limits< size_t >::max()) const |
void | SetValue(size_t index, T value) |
void | SetValue(const ptime & instant, T value) |
void | Reset(size_t length, const ptime & startDate, const TimeStep & timeStep) |
void | Reset(size_t length, const ptime & startDate, const T * values =nullptr) |
void | Reset(size_t length, const ptime & startDate, T value) |
void | Reset(const vector< T > & values, const ptime & startDate) |
void | Reset(const vector< T > & values, const ptime & startDate, const TimeStep & timeStep) |
size_t | GetLength() const |
ptime | GetStartDate() const |
ptime | GetEndDate() const |
TimeStep | GetTimeStep() const |
void | SetTimeStep(const TimeStep & timeStep) |
void | SetStartDate(const ptime & start) |
ptime | TimeForIndex(size_t timeIndex) const |
vector< ptime > | TimeIndices() const |
size_t | IndexForTime(const ptime & instant) const |
size_t | UpperIndexForTime(const ptime & instant) const |
size_t | LowerIndexForTime(const ptime & instant) const |
string | GetSummary() const |
T & | operator[](const ptime & instant) |
T & | operator[](const size_t i) |
const T & | operator[](const ptime & instant) const |
const T & | operator[](const size_t i) const |
TTimeSeries< T > | operator+(const TTimeSeries< T > & rhs) const |
TTimeSeries< T > | operator+(T value) const |
template <typename M > TTimeSeries< T > |
operator*(M multiplicator) const |
int | NumInstances() |
Protected Functions¶
Name | |
---|---|
T | GetNACode() const |
Public Attributes¶
Name | |
---|---|
string | Tag |
Detailed Description¶
A template for univariate, single realisasion time series.
Template Parameters:
- T Element type, typically double or float, but possibly a more complicated type such as another TTimeSeries.
Public Types Documentation¶
using ElementType¶
The type of each element in this time series.
Public Functions Documentation¶
function IsMissingValue¶
function GetMissingValue¶
function TTimeSeries¶
function TTimeSeries¶
inline TTimeSeries(
T default_value,
size_t length,
const ptime & startDate,
const TimeStep & timeStep =TimeStep::GetHourly(),
StoragePolicy< T > * storage =nullptr,
MissingValuePolicy< T > * mvp =nullptr
)
function TTimeSeries¶
inline TTimeSeries(
size_t length,
const ptime & startDate,
const TimeStep & timeStep =TimeStep::GetHourly(),
StoragePolicy< T > * storage =nullptr,
MissingValuePolicy< T > * mvp =nullptr
)
function TTimeSeries¶
inline TTimeSeries(
const vector< T > & values,
const ptime & startDate,
const TimeStep & timeStep =TimeStep::GetHourly(),
StoragePolicy< T > * storage =nullptr,
MissingValuePolicy< T > * mvp =nullptr
)
function TTimeSeries¶
inline TTimeSeries(
const T * values,
size_t length,
const ptime & startDate,
const TimeStep & timeStep =TimeStep::GetHourly(),
StoragePolicy< T > * storage =nullptr,
MissingValuePolicy< T > * mvp =nullptr
)
function TTimeSeries¶
inline TTimeSeries(
std::function< T(size_t)> & valueGen,
size_t length,
const ptime & startDate,
const TimeStep & timeStep =TimeStep::GetHourly(),
StoragePolicy< T > * storage =nullptr,
MissingValuePolicy< T > * mvp =nullptr
)
function TTimeSeries¶
function TTimeSeries¶
function TTimeSeries¶
function TTimeSeries¶
Constructor using the move semantics.
Parameters:
- src time series from which to move data.
Remark: C++ for the Impatient Appendix A. A Painless Introduction to Rvalue References (C++11) See also http://stackoverflow.com/a/3109981/2752565 for information on move semantic
function operator=¶
function operator=¶
function ~TTimeSeries¶
function GetValueNoConst¶
function GetValueConst¶
function GetValue¶
function GetValue¶
function GetValueNoConst¶
function GetValue¶
function GetValue¶
function GetLastValue¶
function CopyTo¶
function CopyWithMissingValueTo¶
inline void CopyWithMissingValueTo(
T * dest,
const T & missingValueValue,
size_t from =0,
size_t to =-1
) const
function CopyValues¶
function CopyTo¶
function GetValues¶
function GetValuesVector¶
inline vector< T > GetValuesVector(
size_t from =0,
size_t to =std::numeric_limits< size_t >::max()
) const
function Subset¶
inline TTimeSeries< T > Subset(
size_t from =0,
size_t to =std::numeric_limits< size_t >::max()
) const
function SetValue¶
function SetValue¶
function Reset¶
function Reset¶
function Reset¶
function Reset¶
function Reset¶
function GetLength¶
function GetStartDate¶
function GetEndDate¶
function GetTimeStep¶
function SetTimeStep¶
function SetStartDate¶
function TimeForIndex¶
function TimeIndices¶
function IndexForTime¶
function UpperIndexForTime¶
function LowerIndexForTime¶
function GetSummary¶
function operator[]¶
function operator[]¶
function operator[]¶
function operator[]¶
function operator+¶
function operator+¶
function operator*¶
function NumInstances¶
Protected Functions Documentation¶
function GetNACode¶
Public Attributes Documentation¶
variable Tag¶
Updated on 2022-08-21 at 18:10:33 +1000