mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | List of all members
mf::ndarray_timed_view< Dim, T > Class Template Reference

Ndarray view with absolute time indices associated to first dimension. More...

#include <ndarray_timed_view.h>

Inheritance diagram for mf::ndarray_timed_view< Dim, T >:
mf::ndarray_view< Dim, T >

Public Member Functions

 ndarray_timed_view ()
 Create null timed view. More...
 
 ndarray_timed_view (const base &vw, time_unit start_time)
 Create timed view where time index start_time is associated with frame vw[0]. More...
 
time_unit start_time () const
 
time_unit end_time () const
 
time_unit duration () const
 
std::ptrdiff_t time_index (time_unit t) const
 
time_unit time_at (std::ptrdiff_t i) const
 
decltype(auto) at_time (time_unit t) const
 
decltype(auto) at_time (time_unit t)
 
time_span span () const
 
void reset (const ndarray_timed_view &vw)
 
- Public Member Functions inherited from mf::ndarray_view< Dim, T >
bool has_default_strides (std::size_t minimal_dimension=0) const noexcept
 Check if view has default strides. More...
 
std::size_t default_strides_padding (std::size_t minimal_dimension=0) const
 Returns padding of the view which has default strides. More...
 
 ndarray_view ()
 Create null view. More...
 
 ndarray_view (pointer start, const shape_type &, const strides_type &)
 Create view with explicitly specified start, shape and strides. More...
 
 ndarray_view (pointer start, const shape_type &shape)
 Create view with explicitly specified start and shape, with default strides (without padding). More...
 
 ndarray_view (const ndarray_view< Dim, std::remove_const_t< T >> &arr)
 Copy-construct view. More...
 
bool is_null () const noexcept
 
 operator bool () const noexcept
 
void reset (const ndarray_view &other) noexcept
 
void reset () noexcept
 
void reset (pointer start, const shape_type &shape, const strides_type &strides)
 
void reset (pointer start, const shape_type &shape)
 
template<typename Arg >
const ndarray_viewoperator= (Arg &&arg) const
 
const ndarray_viewoperator= (const ndarray_view &other) const
 
coordinates_type index_to_coordinates (const index_type &) const
 
index_type coordinates_to_index (const coordinates_type &) const
 
pointer coordinates_to_pointer (const coordinates_type &) const
 
ndarray_view section (const coordinates_type &start, const coordinates_type &end, const strides_type &steps=strides_type(1)) const
 Cuboid section of view, with interval in each axis. More...
 
ndarray_view section (const span_type &span, const strides_type &steps=strides_type(1)) const
 Cuboid section of view, defined using ndspan object. More...
 
ndarray_view< Dim-1, T > 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. More...
 
decltype(auto) operator[] (std::ptrdiff_t c) const
 Subscript operator, creates slice on first dimension. More...
 
fcall_result operator() (std::ptrdiff_t start, std::ptrdiff_t end, std::ptrdiff_t step=1) const
 
fcall_result operator() (std::ptrdiff_t c) const
 
fcall_result operator() () const
 
reference at (const coordinates_type &) const
 
iterator begin () const
 
iterator end () const
 
template<typename T2 >
void assign (const ndarray_view< Dim, T2 > &) const
 
void assign (const ndarray_view< Dim, const T > &other) const
 
template<typename T2 >
bool compare (const ndarray_view< Dim, T2 > &) const
 
bool compare (const ndarray_view< Dim, const T > &other) const
 
template<typename Arg >
bool operator== (Arg &&arg) const
 
template<typename Arg >
bool operator!= (Arg &&arg) const
 
std::size_t size () const
 
pointer start () const noexcept
 
const shape_typeshape () const noexcept
 
const strides_typestrides () const noexcept
 
std::ptrdiff_t contiguous_length () const noexcept
 
span_type full_span () const noexcept
 
template<std::size_t New_dim>
ndarray_view< New_dim, T > reshape (const ndsize< New_dim > &) const
 
ndarray_view< 1+Dim, T > add_front_axis () const
 
ndarray_view swapaxis (std::size_t axis1, std::size_t axis2) const
 

Static Public Member Functions

static ndarray_timed_view null ()
 
- Static Public Member Functions inherited from mf::ndarray_view< Dim, T >
static strides_type default_strides (const shape_type &, std::size_t padding=0)
 Default strides which correspond to row-major order for specified shape. More...
 
static ndarray_view null ()
 

Additional Inherited Members

- Public Types inherited from mf::ndarray_view< Dim, T >
using value_type = T
 
using pointer = T *
 
using reference = T &
 
using index_type = std::ptrdiff_t
 
using coordinates_type = ndptrdiff< Dim >
 
using shape_type = ndsize< Dim >
 
using strides_type = ndptrdiff< Dim >
 
using span_type = ndspan< Dim >
 
using iterator = ndarray_iterator< ndarray_view >
 
using fcall_result = detail::ndarray_view_fcall< Dim, T, 1 >
 
- Static Public Attributes inherited from mf::ndarray_view< Dim, T >
static constexpr std::size_t dimension = Dim
 
- Protected Member Functions inherited from mf::ndarray_view< Dim, T >
ndarray_view section_ (std::ptrdiff_t dim, std::ptrdiff_t start, std::ptrdiff_t end, std::ptrdiff_t step) const
 
std::ptrdiff_t fix_coordinate_ (std::ptrdiff_t c, std::ptrdiff_t dim) const
 
- Protected Attributes inherited from mf::ndarray_view< Dim, T >
pointer start_
 
shape_type shape_
 
strides_type strides_
 
std::ptrdiff_t contiguous_length_
 

Detailed Description

template<std::size_t Dim, typename T>
class mf::ndarray_timed_view< Dim, T >

Ndarray view with absolute time indices associated to first dimension.

Each frame vw[i] is associated with time index t = start_time + i.

Constructor & Destructor Documentation

template<std::size_t Dim, typename T>
mf::ndarray_timed_view< Dim, T >::ndarray_timed_view ( )
inline

Create null timed view.

template<std::size_t Dim, typename T>
mf::ndarray_timed_view< Dim, T >::ndarray_timed_view ( const base vw,
time_unit  start_time 
)
inline

Create timed view where time index start_time is associated with frame vw[0].

vw cannot be the null view.

Member Function Documentation

template<std::size_t Dim, typename T>
decltype(auto) mf::ndarray_timed_view< Dim, T >::at_time ( time_unit  t) const
inline
template<std::size_t Dim, typename T>
decltype(auto) mf::ndarray_timed_view< Dim, T >::at_time ( time_unit  t)
inline
template<std::size_t Dim, typename T>
time_unit mf::ndarray_timed_view< Dim, T >::duration ( ) const
inline
template<std::size_t Dim, typename T>
time_unit mf::ndarray_timed_view< Dim, T >::end_time ( ) const
inline
template<std::size_t Dim, typename T>
static ndarray_timed_view mf::ndarray_timed_view< Dim, T >::null ( )
inlinestatic
template<std::size_t Dim, typename T>
void mf::ndarray_timed_view< Dim, T >::reset ( const ndarray_timed_view< Dim, T > &  vw)
inline
template<std::size_t Dim, typename T>
time_span mf::ndarray_timed_view< Dim, T >::span ( ) const
inline
template<std::size_t Dim, typename T>
time_unit mf::ndarray_timed_view< Dim, T >::start_time ( ) const
inline
template<std::size_t Dim, typename T>
time_unit mf::ndarray_timed_view< Dim, T >::time_at ( std::ptrdiff_t  i) const
inline
template<std::size_t Dim, typename T>
std::ptrdiff_t mf::ndarray_timed_view< Dim, T >::time_index ( time_unit  t) const
inline

The documentation for this class was generated from the following file: