当前位置: 首页>>代码示例>>C++>>正文


C++ Series::discretization方法代码示例

本文整理汇总了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();
    }
开发者ID:dailypips,项目名称:time_series,代码行数:12,代码来源:coarse_grain.hpp

示例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;
    }
开发者ID:dailypips,项目名称:time_series,代码行数:19,代码来源:rotate_left.hpp

示例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;
    }
开发者ID:dailypips,项目名称:time_series,代码行数:20,代码来源:period_sums.hpp


注:本文中的Series::discretization方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。