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::ndspan< Dim, T > Class Template Reference

Cuboid n-dimensional span delimited by two ndcoord vectors. More...

#include <ndspan.h>

Public Types

using coordinates_type = ndcoord< Dim, T >
 
using shape_type = ndsize< Dim >
 

Public Member Functions

 ndspan ()=default
 
 ndspan (const ndspan &)=default
 
 ndspan (const coordinates_type &start, const coordinates_type &end)
 
ndspanoperator= (const ndspan &) noexcept=default
 
const coordinates_typestart_pos () const noexcept
 
const coordinates_typeend_pos () const noexcept
 
bool includes (const coordinates_type &) const
 
bool includes (const ndspan &sub) const
 
bool includes_strict (const ndspan &sub) const
 
shape_type shape () const
 
std::size_t size () const
 

Friends

bool operator== (const ndspan &a, const ndspan &b) noexcept
 
bool operator!= (const ndspan &a, const ndspan &b) noexcept
 

Detailed Description

template<std::size_t Dim, typename T = std::ptrdiff_t>
class mf::ndspan< Dim, T >

Cuboid n-dimensional span delimited by two ndcoord vectors.

Represents the interval, rectangular, or in general Dim-dimensional cuboid region where for all coordinates c inside it and for each dimension 0 <= i < Dim, one has start_pos()[i] <= c[i] < end_pos()[i]. Can be zero-length on any axis (possibly on all).

Member Typedef Documentation

template<std::size_t Dim, typename T = std::ptrdiff_t>
using mf::ndspan< Dim, T >::coordinates_type = ndcoord<Dim, T>
template<std::size_t Dim, typename T = std::ptrdiff_t>
using mf::ndspan< Dim, T >::shape_type = ndsize<Dim>

Constructor & Destructor Documentation

template<std::size_t Dim, typename T = std::ptrdiff_t>
mf::ndspan< Dim, T >::ndspan ( )
default
template<std::size_t Dim, typename T = std::ptrdiff_t>
mf::ndspan< Dim, T >::ndspan ( const ndspan< Dim, T > &  )
default
template<std::size_t Dim, typename T >
mf::ndspan< Dim, T >::ndspan ( const coordinates_type start,
const coordinates_type end 
)

Member Function Documentation

template<std::size_t Dim, typename T = std::ptrdiff_t>
const coordinates_type& mf::ndspan< Dim, T >::end_pos ( ) const
inlinenoexcept
template<std::size_t Dim, typename T >
bool mf::ndspan< Dim, T >::includes ( const coordinates_type c) const
template<std::size_t Dim, typename T >
bool mf::ndspan< Dim, T >::includes ( const ndspan< Dim, T > &  sub) const
template<std::size_t Dim, typename T >
bool mf::ndspan< Dim, T >::includes_strict ( const ndspan< Dim, T > &  sub) const
template<std::size_t Dim, typename T = std::ptrdiff_t>
ndspan& mf::ndspan< Dim, T >::operator= ( const ndspan< Dim, T > &  )
defaultnoexcept
template<std::size_t Dim, typename T = std::ptrdiff_t>
shape_type mf::ndspan< Dim, T >::shape ( ) const
inline
template<std::size_t Dim, typename T = std::ptrdiff_t>
std::size_t mf::ndspan< Dim, T >::size ( ) const
inline
template<std::size_t Dim, typename T = std::ptrdiff_t>
const coordinates_type& mf::ndspan< Dim, T >::start_pos ( ) const
inlinenoexcept

Friends And Related Function Documentation

template<std::size_t Dim, typename T = std::ptrdiff_t>
bool operator!= ( const ndspan< Dim, T > &  a,
const ndspan< Dim, T > &  b 
)
friend
template<std::size_t Dim, typename T = std::ptrdiff_t>
bool operator== ( const ndspan< Dim, T > &  a,
const ndspan< Dim, T > &  b 
)
friend

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