CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
CNORXZ::UIndex< MetaT > Class Template Reference

#include <urange.h>

Inheritance diagram for CNORXZ::UIndex< MetaT >:
CNORXZ::IndexInterface< UIndex< MetaT >, MetaT >

Public Types

typedef IndexInterface< UIndex< MetaT >, MetaTIB
 
typedef URange< MetaTRangeType
 
typedef MetaT MetaType
 

Public Member Functions

 INDEX_RANDOM_ACCESS_ITERATOR_DEFS (MetaType)
 
 DEFAULT_MEMBERS (UIndex)
 
 UIndex (const RangePtr &range, SizeT pos=0)
 
UIndexoperator= (SizeT lexpos)
 
UIndexoperator++ ()
 
UIndexoperator-- ()
 
UIndex operator+ (Int n) const
 
UIndex operator- (Int n) const
 
SizeT operator- (const UIndex &i) const
 
UIndexoperator+= (Int n)
 
UIndexoperator-= (Int n)
 
SizeT lex () const
 
UPos pmax () const
 
UPos lmax () const
 
IndexId< 0 > id () const
 
const MetaToperator* () const
 
SizeT dim () const
 
Sptr< RangeTyperange () const
 
template<SizeT I>
decltype(autostepSize (const IndexId< I > &id) const
 
String stringMeta () const
 
const MetaTmeta () const
 
UIndexat (const MetaT &metaPos)
 
RangePtr prange (const UIndex< MetaType > &last) const
 
SizeT deepFormat () const
 
SizeT deepMax () const
 
UIndexreformat (const Vector< SizeT > &f, const Vector< SizeT > &s)
 
template<class Xpr , class F >
decltype(autoifor (const Xpr &xpr, F &&f) const
 
bool formatIsTrivial () const
 
decltype(autoxpr (const Sptr< UIndex< MetaType > > &_this) const
 
- Public Member Functions inherited from CNORXZ::IndexInterface< UIndex< MetaT >, MetaT >
 ~IndexInterface ()=default
 
UIndex< MetaT > & THIS ()
 
const UIndex< MetaT > & THIS () const
 
UIndex< MetaT > & operator++ ()
 
UIndex< MetaT > & operator-- ()
 
UIndex< MetaT > operator+ (Int n) const
 
UIndex< MetaT > operator- (Int n) const
 
Int operator- (const IndexInterface &i) const
 
UIndex< MetaT > & operator+= (Int n)
 
UIndex< MetaT > & operator-= (Int n)
 
SizeT pos () const
 
SizeT lex () const
 
SizeT pmax () const
 
SizeT lmax () const
 
PtrId ptrId () const
 
decltype(auto) id () const
 
bool operator== (const IndexInterface &i) const
 
bool operator!= (const IndexInterface &i) const
 
bool operator< (const IndexInterface &i) const
 
bool operator> (const IndexInterface &i) const
 
bool operator<= (const IndexInterface &i) const
 
bool operator>= (const IndexInterface &i) const
 
decltype(auto) operator* () const
 
SizeT dim () const
 
decltype(auto) range () const
 
decltype(auto) stepSize (const IndexId< J > &id) const
 
String stringMeta () const
 
decltype(auto) meta () const
 
UIndex< MetaT > & at (const MetaT &meta)
 
RangePtr prange (const IndexInterface &end) const
 
decltype(auto) deepFormat () const
 
decltype(auto) deepMax () const
 
UIndex< MetaT > & reformat (const Vector< SizeT > &f, const Vector< SizeT > &s)
 
decltype(auto) ifor (const Xpr &xpr, F &&f) const
 
bool formatIsTrivial () const
 

Additional Inherited Members

- Protected Attributes inherited from CNORXZ::IndexInterface< UIndex< MetaT >, MetaT >
SizeT mPos
 

Detailed Description

template<typename MetaT>
class CNORXZ::UIndex< MetaT >

Specific index for URange.

Template Parameters
MetaTMeta data type.

Definition at line 30 of file urange.h.

Member Typedef Documentation

◆ IB

Definition at line 34 of file urange.h.

◆ MetaType

template<typename MetaT >
typedef MetaT CNORXZ::UIndex< MetaT >::MetaType

Definition at line 36 of file urange.h.

◆ RangeType

template<typename MetaT >
typedef URange<MetaT> CNORXZ::UIndex< MetaT >::RangeType

Definition at line 35 of file urange.h.

Constructor & Destructor Documentation

◆ UIndex()

template<typename MetaT >
CNORXZ::UIndex< MetaT >::UIndex ( const RangePtr & range,
SizeT pos = 0 )

Construct index from range and position.

Parameters
rangeRange to iterate over.
poslexicographic position.

Definition at line 32 of file urange.cc.h.

Member Function Documentation

◆ at()

template<typename MetaT >
UIndex< MetaT > & CNORXZ::UIndex< MetaT >::at ( const MetaT & metaPos)

set index position so that it's meta data matches input

Parameters
metameta data to be matched

Definition at line 134 of file urange.cc.h.

◆ deepFormat()

template<typename MetaT >
SizeT CNORXZ::UIndex< MetaT >::deepFormat ( ) const

recursive index format

Definition at line 160 of file urange.cc.h.

◆ deepMax()

template<typename MetaT >
SizeT CNORXZ::UIndex< MetaT >::deepMax ( ) const

max of all single-indices (recursive)

Definition at line 166 of file urange.cc.h.

◆ DEFAULT_MEMBERS()

template<typename MetaT >
CNORXZ::UIndex< MetaT >::DEFAULT_MEMBERS ( UIndex< MetaT > )

default constructors and assignments

◆ dim()

template<typename MetaT >
size_t CNORXZ::UIndex< MetaT >::dim ( ) const

index dimension

Definition at line 182 of file urange.cc.h.

◆ formatIsTrivial()

template<typename MetaT >
bool CNORXZ::UIndex< MetaT >::formatIsTrivial ( ) const

check is format is trivial

Definition at line 213 of file urange.cc.h.

◆ id()

template<typename MetaT >
IndexId< 0 > CNORXZ::UIndex< MetaT >::id ( ) const

index ID

Definition at line 110 of file urange.cc.h.

◆ ifor()

template<typename MetaT >
template<class Xpr , class F >
decltype(auto) CNORXZ::UIndex< MetaT >::ifor ( const Xpr & xpr,
F && f ) const

create a for-loop expression

Template Parameters
Xprloop internal expression
Faccumulating function
Parameters
xprloop internal expression
faccumulating function

Definition at line 207 of file urange.cc.h.

◆ INDEX_RANDOM_ACCESS_ITERATOR_DEFS()

template<typename MetaT >
CNORXZ::UIndex< MetaT >::INDEX_RANDOM_ACCESS_ITERATOR_DEFS ( MetaType )

◆ lex()

template<typename MetaT >
SizeT CNORXZ::UIndex< MetaT >::lex ( ) const

lexicographic position

Definition at line 92 of file urange.cc.h.

◆ lmax()

template<typename MetaT >
UPos CNORXZ::UIndex< MetaT >::lmax ( ) const

maximal lexicographic position

Definition at line 104 of file urange.cc.h.

◆ meta()

template<typename MetaT >
const MetaT & CNORXZ::UIndex< MetaT >::meta ( ) const

return meta data at current index position

Definition at line 128 of file urange.cc.h.

◆ operator*()

return meta data at current index position

Definition at line 116 of file urange.cc.h.

◆ operator+()

return index with lexicographic index position incremented n times

Parameters
n

Definition at line 60 of file urange.cc.h.

◆ operator++()

increment lexicographic index position

Definition at line 46 of file urange.cc.h.

◆ operator+=()

increment lexicographic index position n times

Parameters
n

Definition at line 78 of file urange.cc.h.

◆ operator-() [1/2]

Definition at line 72 of file urange.cc.h.

◆ operator-() [2/2]

return index with lexicographic index position decremented n times

Parameters
n

Definition at line 66 of file urange.cc.h.

◆ operator--()

decrement lexicographic index position

Definition at line 53 of file urange.cc.h.

◆ operator-=()

decrement lexicographic index position n times

Parameters
n

Definition at line 85 of file urange.cc.h.

◆ operator=()

Definition at line 39 of file urange.cc.h.

◆ pmax()

template<typename MetaT >
UPos CNORXZ::UIndex< MetaT >::pmax ( ) const

maximal memory position

Definition at line 98 of file urange.cc.h.

◆ prange()

template<typename MetaT >
RangePtr CNORXZ::UIndex< MetaT >::prange ( const UIndex< MetaType > & last) const

create partial range starting at this index' position and ending at the position of input index. The end position is included!

Parameters
endend index

Definition at line 147 of file urange.cc.h.

◆ range()

template<typename MetaT >
Sptr< URange< MetaT > > CNORXZ::UIndex< MetaT >::range ( ) const

pointer to the range the index is defined on

Definition at line 188 of file urange.cc.h.

◆ reformat()

template<typename MetaT >
UIndex< MetaT > & CNORXZ::UIndex< MetaT >::reformat ( const Vector< SizeT > & f,
const Vector< SizeT > & s )

reformat index, create new index instance

Parameters
fnew format
snew sub-index sizes

Definition at line 172 of file urange.cc.h.

◆ stepSize()

template<typename MetaT >
template<SizeT I>
decltype(auto) CNORXZ::UIndex< MetaT >::stepSize ( const IndexId< I > & id) const

return the memory step size this index has w.r.t. to index of given ID

Template Parameters
Jstatic index ID, size type
Parameters
idinput index ID

Definition at line 195 of file urange.cc.h.

◆ stringMeta()

template<typename MetaT >
String CNORXZ::UIndex< MetaT >::stringMeta ( ) const

return string formatted meta data at current index position

Definition at line 122 of file urange.cc.h.

◆ xpr()

template<typename MetaT >
decltype(auto) CNORXZ::UIndex< MetaT >::xpr ( const Sptr< UIndex< MetaType > > & _this) const

Definition at line 141 of file urange.cc.h.


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