![]() |
Home | Libraries | People | FAQ | More |
boost::time_series::time_series_facade — Represents a series of observations at regular intervals.
// In header: <boost/time_series/time_series_facade.hpp> template<typename Derived, typename Storage, typename Discretization> struct time_series_facade : public boost::time_series::time_series_base< Derived > { // types typedef Storage storage_type; typedef Discretization discretization_type; typedef range_run_storage::concepts::InfiniteRangeRunStorage< Storage > storage_concept; typedef storage_concept::value_type value_type; typedef storage_concept::offset_type offset_type; typedef storage_concept::zero_type zero_type; typedef result_of< range_run_storage::op::get_at(storage_type &, offset_type &) >::type reference; typedef reference const_reference; // construct/copy/destruct template<typename Args> time_series_facade(Args const &); template<typename Series> time_series_facade& operator=(Series const &); // public member functions reference operator[](offset_type) const; discretization_type discretization() const; void discretization(discretization_type) ; void swap(time_series_facade< Derived, Storage, Discretization > &) ; // private member functions storage_type & data() ; storage_type const & data() const; template<typename Archive> void serialize(Archive &, unsigned int const ) ; };
time_series_facade<> is used to make a model of the InfiniteRangeRunStorage concept a model of the TimeSeries concept by providing a discretization, and also to provide a consistent interface constisting of additional helper functions not part of the TimeSeries concept.
template<typename Args> time_series_facade(Args const & args);
Construct a time_series_facade<> from an ArgumentPack.
Forwards the argument pack to the constructor of the underlying InfiniteRangeRunStorage data member, after filtering out the discretization named parameter.
| Parameters: |
|
template<typename Series> time_series_facade& operator=(Series const & that);
Assign from a model of the TimeSeries concept.
| Parameters: |
|
||
| Requires: |
Series is a model of the TimeSeries concept. this->discretization() == that.discretization() There is a legal series conversion from Series to Derived. (Eg., A delta series cannot represent a dense series in general.) Storage is a model of Mutable_InfiniteRangeRunStorage |
reference operator[](offset_type n) const;
Return the value of the series at a particular offset.
| Parameters: |
|
||
| Returns: | The result of calling range_run_storage::get_at() with the underlying InfiniteRangeRunStorage and n |
discretization_type discretization() const;
| Returns: | The value of the series' discretization. |
void discretization(discretization_type disc) ;Sets the value of the series' discretization.
void swap(time_series_facade< Derived, Storage, Discretization > & that) ;
Swaps two time_series_facade<> objects.
| Parameters: |
|