Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template time_series_facade

boost::time_series::time_series_facade — Represents a series of observations at regular intervals.

Synopsis

// 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 ) ;
};

Description

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.

time_series_facade public construct/copy/destruct

  1. 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:
    args

    A model of ArgumentPack

  2. template<typename Series> time_series_facade& operator=(Series const & that);

    Assign from a model of the TimeSeries concept.

    Parameters:
    that

    The series to assign from.

    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

time_series_facade public member functions

  1. reference operator[](offset_type n) const;

    Return the value of the series at a particular offset.

    Parameters:
    n

    The offset.

    Returns:

    The result of calling range_run_storage::get_at() with the underlying InfiniteRangeRunStorage and n

  2. discretization_type discretization() const;

    Returns:

    The value of the series' discretization.

  3. void discretization(discretization_type disc) ;
    Sets the value of the series' discretization.
  4. void swap(time_series_facade< Derived, Storage, Discretization > & that) ;

    Swaps two time_series_facade<> objects.

    Parameters:
    that

    The time_series_facade<> object to swap with.

time_series_facade private member functions

  1. storage_type & data() ;
  2. storage_type const & data() const;
  3. template<typename Archive> 
      void serialize(Archive & ar, unsigned int const  version) ;

PrevUpHomeNext