1 #ifndef MF_NDARRAY_TIMED_VIEW_GENERIC_H_
2 #define MF_NDARRAY_TIMED_VIEW_GENERIC_H_
11 template<std::
size_t Dim>
25 base(vw), format_(format) { }
27 base(start_time), format_(format) { }
29 base(gen_vw, start_time), format_(gen_vw.
format()) { }
41 decltype(
auto) operator[](std::ptrdiff_t c)
const
44 decltype(
auto) operator()(std::ptrdiff_t
start, std::ptrdiff_t
end, std::ptrdiff_t step = 1)
const
47 decltype(
auto) operator()(std::ptrdiff_t c)
const
50 decltype(
auto) operator()()
const
55 template<std::
size_t Generic_dim, std::
size_t Concrete_dim,
typename Concrete_elem>
63 template<std::
size_t Concrete_dim,
typename Concrete_elem, std::
size_t Generic_dim>
Generic ndarray_view where lower dimension(s) are type-erased.
Definition: ndarray_view_generic.h:25
Mapping between coordinates, indices, and addresses of multi-dimensional data.
Definition: ndarray_view.h:16
ndarray_timed_view_generic(time_unit start_time, const frame_format &format)
Definition: ndarray_timed_view_generic.h:26
std::ptrdiff_t time_unit
Discrete time unit type.
Definition: common.h:52
static ndarray_timed_view_generic null()
Definition: ndarray_timed_view_generic.h:31
ndarray_timed_view_generic(const ndarray_view_generic< Dim > &gen_vw, time_unit start_time)
Definition: ndarray_timed_view_generic.h:28
ndsize< Dim > shape_type
Definition: ndarray_view.h:75
Ndarray view with absolute time indices associated to first dimension.
Definition: ndarray_timed_view.h:13
decltype(auto) operator[](std::ptrdiff_t c) const
Subscript operator, creates slice on first dimension.
Definition: ndarray_view.h:163
ndarray_timed_view_generic(const base &vw, const frame_format &format)
Definition: ndarray_timed_view_generic.h:24
ndarray_view< Dim-1, byte > slice(std::ptrdiff_t c, std::ptrdiff_t dimension) const
Create ndarray_view with one less dimension, by fixing coordinate of axis dimension to c...
typename base::strides_type strides_type
Definition: ndarray_timed_view_generic.h:17
ndarray_timed_view_generic()
Definition: ndarray_timed_view_generic.h:23
ndarray_timed_view_generic< Generic_dim > to_generic(const ndarray_timed_view< Concrete_dim, Concrete_elem > &vw)
Definition: ndarray_timed_view_generic.h:56
ndptrdiff< Dim > strides_type
Definition: ndarray_view.h:76
Vector of n-dimensional coordinates.
Definition: ndcoord.h:18
const frame_format & format() const noexcept
Definition: ndarray_timed_view_generic.h:36
Generic ndarray_timed_view where lower dimension(s) are type-erased.
Definition: ndarray_timed_view_generic.h:12
static constexpr std::size_t dimension
Definition: ndarray_view.h:81
time_unit start_time() const
Definition: ndarray_timed_view.h:33
pointer start() const noexcept
Definition: ndarray_view.h:199
ndarray_timed_view< Concrete_dim, Concrete_elem > from_generic(const ndarray_timed_view_generic< Generic_dim > &gen_vw, const ndsize< Concrete_dim-Generic_dim > &frame_shape)
Definition: ndarray_timed_view_generic.h:64
decltype(auto) slice(std::ptrdiff_t c, std::ptrdiff_t dimension) const
Definition: ndarray_timed_view_generic.h:38
typename base::shape_type shape_type
Definition: ndarray_timed_view_generic.h:16