![]() |
Home | Libraries | People | FAQ | More |
boost::time_series::shifted_variable_period_sums — Calculate the sums within variable-width periods in a series with a variable shift, where the periods and the shifts are defined in a RandomAccessRange.
// In header: <boost/time_series/numeric/variable_period_sums.hpp> template<typename Series, typename Periods, typename Shifts, typename Out> ordered_inserter< Out > shifted_variable_period_sums(Series const & series, Periods const & periods, Shifts const & shifts, ordered_inserter< Out > out); template<typename Series, typename Periods, typename Shifts> sparse_series< typename concepts::TimeSeries< Series const >::value_type typename concepts::TimeSeries< Series const >::discretization_type, typename concepts::TimeSeries< Series const >::offset_type > shifted_variable_period_sums(Series const & series, Periods const & periods, Shifts const & shifts);
Calculate the sums within variable-width periods in a series with a variable shift, where the periods and the shifts are defined in a RandomAccessRange. The periods are specified as follows:
<verbatim>[-inf,*boost::begin(periods)) </verbatim>
<verbatim>[*boost::begin(periods),*(boost::begin(periods)+1)) </verbatim>
<verbatim>[*(boost::begin(periods)+1),*(boost::begin(periods)+2)) </verbatim>
<verbatim>... </verbatim>
<verbatim>[*(boost::end(periods)-1),inf) </verbatim>
The sum for each period is stored at the start of the period, plus the shift for that period.
| Parameters: |
|
||||||||
| Requires: |
Series is a model of the TimeSeries concept. Periods is a model of the RandomAccessRange concept. Shifts is a model of the RandomAccessRange concept. Out is a model of the OrderedInserter concept. <verbatim>boost::size(periods) == boost::size(shifts) </verbatim> |