1 #include "cheetah/data/detail/DmTimeSlice.h" 2 #include "cheetah/data/detail/DmTimeSliceIterator.h" 9 template <
typename DmTimeType>
10 DmTimeSlice<DmTimeType>::DmTimeSlice(std::size_t start_dm_idx, std::size_t number_dms_per_slice,
13 , _start_dm_idx(start_dm_idx)
14 , _number_dms_per_slice(number_dms_per_slice)
18 template <
typename DmTimeType>
19 DmTimeSlice<DmTimeType>::~DmTimeSlice()
23 template <
typename DmTimeType>
26 return Iterator(_start_dm_idx, this->shared_from_this());
29 template <
typename DmTimeType>
32 return ConstIterator(_start_dm_idx, this->shared_from_this());
35 template <
typename DmTimeType>
39 std::size_t end_idx = std::min(blocks().front()->size(),_start_dm_idx+_number_dms_per_slice);
40 return Iterator(end_idx, this->shared_from_this());
43 template <
typename DmTimeType>
47 std::size_t end_idx = std::min(blocks().front()->size(),_start_dm_idx+_number_dms_per_slice);
51 template <
typename DmTimeType>
54 return _parent->blocks();
Class that wraps a subset of DMs from a DmTime object.
Some limits and constants for FLDO.
ContainerType const & blocks() const
Get a constant reference to the underlying list of DmTime shared pointers.
An iterator over a DmTimeSlice object.
Iterator begin()
Get an iterator poiting to the start of the slice.
Iterator end()
Get an iterator poiting to the end of the slice.