CAPD RedHom Library
capd::homAux::MultiArrayIndexer< DIM > Class Template Reference

#include <capd/homAux/MultiArrayIndexer.h>

Classes

struct  MakeIndex
 

Public Types

typedef Base::Coordinates Coordinates
 
typedef boost::transformed_range< MakeIndex, boost::iterator_range< const impl::IndexValue * > > AllIndices
 
typedef boost::multi_array_ref< impl::IndexValue, DIMIndexer
 
typedef Indexer::element::value_type value_type
 
typedef value_type Value
 
typedef Indexer::index Index
 
typedef Indexer::index_gen IndexGen
 
typedef IndexGen::template gen_type< DIM, DIM >::type IndexGenFull
 
typedef Indexer::index_range IndexRange
 
typedef Indexer::size_type SizeType
 

Public Member Functions

template<typename Shape >
 MultiArrayIndexer (const Shape &shape)
 
Coordinates coordinatesOf (typename Base::SizeType pos) const
 
template<typename Coordinates >
void coordinatesOf (typename Base::SizeType pos, Coordinates &coordinates) const
 
template<typename Indices >
Base::Index offset (const Indices &indices) const
 
AllIndices allIndices () const
 
SizeType size () const
 
boost::iterator_range< const SizeType * > shape () const
 
boost::iterator_range< const Index * > strides () const
 
SizeType dim () const
 
IndexGen indices () const
 
IndexRange range () const
 
IndexRange range (Index b, Index e) const
 
Value operator() (const Indices &indices) const
 
Value operator() (std::initializer_list< Index > indices) const
 
bool isInside (const Indices &indices) const
 
bool isValid (const Indices &indices) const
 
View< NDims >::type operator[] (const boost::detail::multi_array::index_gen< DIM, NDims > &indices) const
 
void forEach (Function f) const
 
void apply (const Ranges &ranges, Function function) const
 
void all (Callback cb, typename boost::result_of< Callback(Value, const Coordinates &)>::type *p=0) const
 
void all (Callback cb, typename boost::result_of< Callback(Value)>::type *p=0) const
 

Static Public Attributes

static const std::size_t DIM
 

Protected Attributes

Indexer _indexer
 

Member Typedef Documentation

template<size_t DIM>
typedef boost::transformed_range<MakeIndex, boost::iterator_range<const impl::IndexValue *> > capd::homAux::MultiArrayIndexer< DIM >::AllIndices
typedef Indexer::index capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::Index
inherited
typedef boost::multi_array_ref< impl::IndexValue, DIM > capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::Indexer
inherited
typedef Indexer::index_gen capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::IndexGen
inherited
typedef IndexGen::template gen_type<DIM, DIM>::type capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::IndexGenFull
inherited
typedef Indexer::index_range capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::IndexRange
inherited
typedef Indexer::size_type capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::SizeType
inherited
typedef value_type capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::Value
inherited
typedef Indexer::element::value_type capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::value_type
inherited

Constructor & Destructor Documentation

template<size_t DIM>
template<typename Shape >
capd::homAux::MultiArrayIndexer< DIM >::MultiArrayIndexer ( const Shape &  shape)
inlineexplicit

Member Function Documentation

void capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::all ( Callback  cb,
typename boost::result_of< Callback(Value, const Coordinates &)>::type *  p = 0 
) const
inlineinherited
void capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::all ( Callback  cb,
typename boost::result_of< Callback(Value)>::type *  p = 0 
) const
inlineinherited
template<size_t DIM>
AllIndices capd::homAux::MultiArrayIndexer< DIM >::allIndices ( ) const
inline
void capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::apply ( const Ranges &  ranges,
Function  function 
) const
inlineinherited
template<size_t DIM>
Coordinates capd::homAux::MultiArrayIndexer< DIM >::coordinatesOf ( typename Base::SizeType  pos) const
inline
template<size_t DIM>
template<typename Coordinates >
void capd::homAux::MultiArrayIndexer< DIM >::coordinatesOf ( typename Base::SizeType  pos,
Coordinates coordinates 
) const
inline
SizeType capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::dim ( ) const
inlineinherited
void capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::forEach ( Function  f) const
inlineinherited
IndexGen capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::indices ( ) const
inlineinherited
bool capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::isInside ( const Indices &  indices) const
inlineinherited
bool capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::isValid ( const Indices &  indices) const
inlineinherited
template<size_t DIM>
template<typename Indices >
Base::Index capd::homAux::MultiArrayIndexer< DIM >::offset ( const Indices &  indices) const
inline
Value capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::operator() ( const Indices &  indices) const
inlineinherited
Value capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::operator() ( std::initializer_list< Index indices) const
inlineinherited
View<NDims>::type capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::operator[] ( const boost::detail::multi_array::index_gen< DIM, NDims > &  indices) const
inlineinherited
IndexRange capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::range ( ) const
inlineinherited
IndexRange capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::range ( Index  b,
Index  e 
) const
inlineinherited
boost::iterator_range<const SizeType *> capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::shape ( ) const
inlineinherited
SizeType capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::size ( ) const
inlineinherited
boost::iterator_range<const Index *> capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::strides ( ) const
inlineinherited

Member Data Documentation

Indexer capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::_indexer
protectedinherited
const std::size_t capd::homAux::impl::MultiArrayIndexerBase< boost::multi_array_ref< impl::IndexValue, DIM > >::DIM
staticinherited