本文整理汇总了C++中Series::discretization方法的典型用法代码示例。如果您正苦于以下问题:C++ Series::discretization方法的具体用法?C++ Series::discretization怎么用?C++ Series::discretization使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Series
的用法示例。
在下文中一共展示了Series::discretization方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: copy
coarse_grain(Series const &series, Discretization discretization, ordered_inserter<Out> out)
{
typedef typename concepts::TimeSeries<Series const>::offset_type offset_type;
BOOST_ASSERT(discretization > series.discretization());
BOOST_ASSERT(discretization % series.discretization() == 0);
offset_type factor = discretization / series.discretization();
detail::coarse_grain_inserter<ordered_inserter<Out>, offset_type> o(out, factor);
return range_run_storage::copy(series, o).out();
}
示例2: result
rotate_left(Series const &series, typename concepts::TimeSeries<Series const>::value_type const &value)
{
typedef typename concepts::TimeSeries<Series const>::value_type value_type;
typedef typename concepts::TimeSeries<Series const>::discretization_type discretization_type;
typedef typename concepts::TimeSeries<Series const>::offset_type offset_type;
// The partial differences are held in a sparse array.
sparse_series<value_type, discretization_type, offset_type> result(
time_series::discretization = series.discretization()
);
time_series::rotate_left(
series
, value
, time_series::make_ordered_inserter(result)
).commit();
return result;
}
示例3: result
period_sums(Series const &series, Offset start, Length length)
{
typedef typename concepts::TimeSeries<Series const>::value_type value_type;
typedef typename concepts::TimeSeries<Series const>::discretization_type discretization_type;
// The periodic sums are held in a sparse array. The sums are
// stored at the start of their associated periods.
sparse_series<value_type, discretization_type, Offset> result(
time_series::discretization = series.discretization()
);
time_series::period_sums(
series
, start
, length
, time_series::make_ordered_inserter(result)
).commit();
return result;
}