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

Vector of n-dimensional coordinates. More...

#include <ndcoord.h>

Public Types

using value_type = T
 
using reference = T &
 
using const_reference = const T &
 
using iterator = typename std::array< T, Dim >::iterator
 
using const_iterator = typename std::array< T, Dim >::const_iterator
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 ndcoord (T value=0) noexcept
 
template<typename It >
 ndcoord (It begin, It end)
 
 ndcoord (std::initializer_list< T > l) noexcept
 
 ndcoord (const ndcoord &)=default
 
template<typename T2 >
 ndcoord (const ndcoord< Dim, T2 > &coord)
 
T & operator[] (std::ptrdiff_t i) noexcept
 
const T & operator[] (std::ptrdiff_t i) const noexcept
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 
size_type size () const noexcept
 
template<typename Unary >
ndcoordtransform_inplace (Unary fct)
 
template<typename Binary >
ndcoordtransform_inplace (const ndcoord &c, Binary fct)
 
ndcoordoperator+= (const ndcoord &c) noexcept
 
ndcoordoperator-= (const ndcoord &c) noexcept
 
ndcoordoperator*= (const ndcoord &c) noexcept
 
ndcoordoperator/= (const ndcoord &c) noexcept
 
ndcoordoperator*= (T val) noexcept
 
ndcoordoperator/= (T val) noexcept
 
ndcoord operator+ () noexcept
 
ndcoord operator- () noexcept
 
product () const noexcept
 
const T & front () const noexcept
 
T & front () noexcept
 
const T & back () const noexcept
 
T & back () noexcept
 
template<std::size_t Section_dim = Dim - 1>
auto tail () const noexcept
 
template<std::size_t Section_dim = Dim - 1>
auto head () const noexcept
 
ndcoord< Dim-1, T > erase (std::ptrdiff_t i) const noexcept
 

Friends

ndcoord operator+ (const ndcoord &a, const ndcoord &b) noexcept
 
ndcoord operator- (const ndcoord &a, const ndcoord &b) noexcept
 
ndcoord operator* (const ndcoord &a, const ndcoord &b) noexcept
 
ndcoord operator/ (const ndcoord &a, const ndcoord &b) noexcept
 
ndcoord operator* (const ndcoord &a, T val) noexcept
 
ndcoord operator/ (const ndcoord &a, T val) noexcept
 
bool operator== (const ndcoord &a, const ndcoord &b) noexcept
 
bool operator!= (const ndcoord &a, const ndcoord &b) noexcept
 

Detailed Description

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

Vector of n-dimensional coordinates.

Vector of size Dim with items of arithmetic type T. Used mainly for coordinates of ndarray_view. For real-values vectors expressing positions or directions in space, the Eigen vector types are used instead.

Member Typedef Documentation

template<std::size_t Dim, typename T>
using mf::ndcoord< Dim, T >::const_iterator = typename std::array<T, Dim>::const_iterator
template<std::size_t Dim, typename T>
using mf::ndcoord< Dim, T >::const_reference = const T&
template<std::size_t Dim, typename T>
using mf::ndcoord< Dim, T >::difference_type = std::ptrdiff_t
template<std::size_t Dim, typename T>
using mf::ndcoord< Dim, T >::iterator = typename std::array<T, Dim>::iterator
template<std::size_t Dim, typename T>
using mf::ndcoord< Dim, T >::reference = T&
template<std::size_t Dim, typename T>
using mf::ndcoord< Dim, T >::size_type = std::size_t
template<std::size_t Dim, typename T>
using mf::ndcoord< Dim, T >::value_type = T

Constructor & Destructor Documentation

template<std::size_t Dim, typename T>
mf::ndcoord< Dim, T >::ndcoord ( value = 0)
inlinenoexcept
template<std::size_t Dim, typename T>
template<typename It >
mf::ndcoord< Dim, T >::ndcoord ( It  begin,
It  end 
)
inline
template<std::size_t Dim, typename T>
mf::ndcoord< Dim, T >::ndcoord ( std::initializer_list< T >  l)
inlinenoexcept
template<std::size_t Dim, typename T>
mf::ndcoord< Dim, T >::ndcoord ( const ndcoord< Dim, T > &  )
default
template<std::size_t Dim, typename T>
template<typename T2 >
mf::ndcoord< Dim, T >::ndcoord ( const ndcoord< Dim, T2 > &  coord)
inline

Member Function Documentation

template<std::size_t Dim, typename T>
const T& mf::ndcoord< Dim, T >::back ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
T& mf::ndcoord< Dim, T >::back ( )
inlinenoexcept
template<std::size_t Dim, typename T>
iterator mf::ndcoord< Dim, T >::begin ( )
inlinenoexcept
template<std::size_t Dim, typename T>
const_iterator mf::ndcoord< Dim, T >::begin ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
const_iterator mf::ndcoord< Dim, T >::cbegin ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
const_iterator mf::ndcoord< Dim, T >::cend ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
iterator mf::ndcoord< Dim, T >::end ( )
inlinenoexcept
template<std::size_t Dim, typename T>
const_iterator mf::ndcoord< Dim, T >::end ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
ndcoord<Dim - 1, T> mf::ndcoord< Dim, T >::erase ( std::ptrdiff_t  i) const
inlinenoexcept
template<std::size_t Dim, typename T>
const T& mf::ndcoord< Dim, T >::front ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
T& mf::ndcoord< Dim, T >::front ( )
inlinenoexcept
template<std::size_t Dim, typename T>
template<std::size_t Section_dim = Dim - 1>
auto mf::ndcoord< Dim, T >::head ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
ndcoord& mf::ndcoord< Dim, T >::operator*= ( const ndcoord< Dim, T > &  c)
inlinenoexcept
template<std::size_t Dim, typename T>
ndcoord& mf::ndcoord< Dim, T >::operator*= ( val)
inlinenoexcept
template<std::size_t Dim, typename T>
ndcoord mf::ndcoord< Dim, T >::operator+ ( )
inlinenoexcept
template<std::size_t Dim, typename T>
ndcoord& mf::ndcoord< Dim, T >::operator+= ( const ndcoord< Dim, T > &  c)
inlinenoexcept
template<std::size_t Dim, typename T>
ndcoord mf::ndcoord< Dim, T >::operator- ( )
inlinenoexcept
template<std::size_t Dim, typename T>
ndcoord& mf::ndcoord< Dim, T >::operator-= ( const ndcoord< Dim, T > &  c)
inlinenoexcept
template<std::size_t Dim, typename T>
ndcoord& mf::ndcoord< Dim, T >::operator/= ( const ndcoord< Dim, T > &  c)
inlinenoexcept
template<std::size_t Dim, typename T>
ndcoord& mf::ndcoord< Dim, T >::operator/= ( val)
inlinenoexcept
template<std::size_t Dim, typename T>
T& mf::ndcoord< Dim, T >::operator[] ( std::ptrdiff_t  i)
inlinenoexcept
template<std::size_t Dim, typename T>
const T& mf::ndcoord< Dim, T >::operator[] ( std::ptrdiff_t  i) const
inlinenoexcept
template<std::size_t Dim, typename T>
T mf::ndcoord< Dim, T >::product ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
size_type mf::ndcoord< Dim, T >::size ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
template<std::size_t Section_dim = Dim - 1>
auto mf::ndcoord< Dim, T >::tail ( ) const
inlinenoexcept
template<std::size_t Dim, typename T>
template<typename Unary >
ndcoord& mf::ndcoord< Dim, T >::transform_inplace ( Unary  fct)
inline
template<std::size_t Dim, typename T>
template<typename Binary >
ndcoord& mf::ndcoord< Dim, T >::transform_inplace ( const ndcoord< Dim, T > &  c,
Binary  fct 
)
inline

Friends And Related Function Documentation

template<std::size_t Dim, typename T>
bool operator!= ( const ndcoord< Dim, T > &  a,
const ndcoord< Dim, T > &  b 
)
friend
template<std::size_t Dim, typename T>
ndcoord operator* ( const ndcoord< Dim, T > &  a,
const ndcoord< Dim, T > &  b 
)
friend
template<std::size_t Dim, typename T>
ndcoord operator* ( const ndcoord< Dim, T > &  a,
val 
)
friend
template<std::size_t Dim, typename T>
ndcoord operator+ ( const ndcoord< Dim, T > &  a,
const ndcoord< Dim, T > &  b 
)
friend
template<std::size_t Dim, typename T>
ndcoord operator- ( const ndcoord< Dim, T > &  a,
const ndcoord< Dim, T > &  b 
)
friend
template<std::size_t Dim, typename T>
ndcoord operator/ ( const ndcoord< Dim, T > &  a,
const ndcoord< Dim, T > &  b 
)
friend
template<std::size_t Dim, typename T>
ndcoord operator/ ( const ndcoord< Dim, T > &  a,
val 
)
friend
template<std::size_t Dim, typename T>
bool operator== ( const ndcoord< Dim, T > &  a,
const ndcoord< Dim, T > &  b 
)
friend

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