![]() |
Home | Libraries | People | FAQ | More |
boost::time_series::adjacent_difference — Calculate the adjacent difference of a series.
// In header: <boost/time_series/numeric/adjacent_difference.hpp> template<typename Series, typename Out> ordered_inserter< Out > adjacent_difference(Series const & series, ordered_inserter< Out > out); template<typename Series> sparse_series< typename concepts::TimeSeries< Series const >::value_type typename concepts::TimeSeries< Series const >::discretization_type, typename concepts::TimeSeries< Series const >::offset_type > adjacent_difference(Series const & series);
Calculate the adjacent difference of a series, much like std::adjacent_difference.
| Parameters: |
|
||||
| Requires: |
Series is a model of the TimeSeries concept. Out is a model of the OrderedInserter concept. For variaibles x and y of the series' value_type, the expression (x-y) must be convertible to value_type. |
||||
| Returns: | A sparse_series<> if no ordered inserter is specified; otherwise, the ordered inserter. |
||||
| Notes: | If using the version that takes an OrderedInserter, you must call .commit() on the returned OrderedInserter when you are done with it. |