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

#include <crange.h>

Inheritance diagram for CNORXZ::CIndex:
CNORXZ::IndexInterface< CIndex, SizeT >

Public Types

typedef IndexInterface< CIndex, SizeTIB
 
typedef CRange RangeType
 
typedef SizeT MetaType
 

Public Member Functions

 INDEX_RANDOM_ACCESS_ITERATOR_DEFS (MetaType)
 
 DEFAULT_MEMBERS (CIndex)
 
 CIndex (const RangePtr &range, SizeT pos=0)
 
CIndexoperator= (SizeT lexpos)
 
CIndexoperator++ ()
 
CIndexoperator-- ()
 
CIndex operator+ (Int n) const
 
CIndex operator- (Int n) const
 
SizeT operator- (const CIndex &i) const
 
CIndexoperator+= (Int n)
 
CIndexoperator-= (Int n)
 
SizeT lex () const
 
UPos pmax () const
 
UPos lmax () const
 
IndexId< 0 > id () const
 
SizeT operator* () const
 
SizeT dim () const
 
Sptr< RangeTyperange () const
 
template<SizeT I>
decltype(autostepSize (const IndexId< I > &id) const
 
String stringMeta () const
 
SizeT meta () const
 
CIndexat (const SizeT &metaPos)
 
RangePtr prange (const CIndex &last) const
 
SizeT deepFormat () const
 
SizeT deepMax () const
 
CIndexreformat (const Vector< SizeT > &f, const Vector< SizeT > &s)
 
template<class Xpr , class F = NoF>
decltype(autoifor (const Xpr &xpr, F &&f) const
 
bool formatIsTrivial () const
 
COpRoot< SizeT, CIndexxpr (const Sptr< CIndex > &_this) const
 
- Public Member Functions inherited from CNORXZ::IndexInterface< CIndex, SizeT >
 ~IndexInterface ()=default
 
CIndexTHIS ()
 
const CIndexTHIS () const
 
CIndexoperator++ ()
 
CIndexoperator-- ()
 
CIndex operator+ (Int n) const
 
CIndex operator- (Int n) const
 
Int operator- (const IndexInterface &i) const
 
CIndexoperator+= (Int n)
 
CIndexoperator-= (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
 
CIndexat (const SizeT &meta)
 
RangePtr prange (const IndexInterface &end) const
 
decltype(auto) deepFormat () const
 
decltype(auto) deepMax () const
 
CIndexreformat (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< CIndex, SizeT >
SizeT mPos
 

Detailed Description


Specific index for CRange.

Definition at line 25 of file crange.h.

Member Typedef Documentation

◆ IB

Definition at line 29 of file crange.h.

◆ MetaType

Definition at line 31 of file crange.h.

◆ RangeType

Definition at line 30 of file crange.h.

Constructor & Destructor Documentation

◆ CIndex()

CNORXZ::CIndex::CIndex ( const RangePtr & range,
SizeT pos = 0 )

Construct index from range and position.

Parameters
rangeRange to iterate over.
poslexicographic position.

Definition at line 22 of file crange.cc.

Member Function Documentation

◆ at()

CIndex & CNORXZ::CIndex::at ( const SizeT & metaPos)

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

Parameters
metameta data to be matched

Definition at line 116 of file crange.cc.

◆ deepFormat()

SizeT CNORXZ::CIndex::deepFormat ( ) const

recursive index format

Definition at line 147 of file crange.cc.

◆ deepMax()

SizeT CNORXZ::CIndex::deepMax ( ) const

max of all single-indices (recursive)

Definition at line 152 of file crange.cc.

◆ DEFAULT_MEMBERS()

CNORXZ::CIndex::DEFAULT_MEMBERS ( CIndex )

default constructors and assignments

◆ dim()

SizeT CNORXZ::CIndex::dim ( ) const

index dimension

Definition at line 96 of file crange.cc.

◆ formatIsTrivial()

bool CNORXZ::CIndex::formatIsTrivial ( ) const

check is format is trivial

Definition at line 166 of file crange.cc.

◆ id()

IndexId< 0 > CNORXZ::CIndex::id ( ) const

index ID

Definition at line 86 of file crange.cc.

◆ ifor()

template<class Xpr , class F >
decltype(auto) CNORXZ::CIndex::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 32 of file crange.cc.h.

◆ INDEX_RANDOM_ACCESS_ITERATOR_DEFS()

CNORXZ::CIndex::INDEX_RANDOM_ACCESS_ITERATOR_DEFS ( MetaType )

◆ lex()

SizeT CNORXZ::CIndex::lex ( ) const

lexicographic position

Definition at line 71 of file crange.cc.

◆ lmax()

UPos CNORXZ::CIndex::lmax ( ) const

maximal lexicographic position

Definition at line 76 of file crange.cc.

◆ meta()

SizeT CNORXZ::CIndex::meta ( ) const

return meta data at current index position

Definition at line 111 of file crange.cc.

◆ operator*()

SizeT CNORXZ::CIndex::operator* ( ) const

return meta data at current index position

Definition at line 91 of file crange.cc.

◆ operator+()

CIndex CNORXZ::CIndex::operator+ ( Int n) const

return index with lexicographic index position incremented n times

Parameters
n

Definition at line 44 of file crange.cc.

◆ operator++()

CIndex & CNORXZ::CIndex::operator++ ( )

increment lexicographic index position

Definition at line 32 of file crange.cc.

◆ operator+=()

CIndex & CNORXZ::CIndex::operator+= ( Int n)

increment lexicographic index position n times

Parameters
n

Definition at line 59 of file crange.cc.

◆ operator-() [1/2]

SizeT CNORXZ::CIndex::operator- ( const CIndex & i) const

Definition at line 54 of file crange.cc.

◆ operator-() [2/2]

CIndex CNORXZ::CIndex::operator- ( Int n) const

return index with lexicographic index position decremented n times

Parameters
n

Definition at line 49 of file crange.cc.

◆ operator--()

CIndex & CNORXZ::CIndex::operator-- ( )

decrement lexicographic index position

Definition at line 38 of file crange.cc.

◆ operator-=()

CIndex & CNORXZ::CIndex::operator-= ( Int n)

decrement lexicographic index position n times

Parameters
n

Definition at line 65 of file crange.cc.

◆ operator=()

CIndex & CNORXZ::CIndex::operator= ( SizeT lexpos)

Definition at line 26 of file crange.cc.

◆ pmax()

UPos CNORXZ::CIndex::pmax ( ) const

maximal memory position

Definition at line 81 of file crange.cc.

◆ prange()

RangePtr CNORXZ::CIndex::prange ( const CIndex & 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 135 of file crange.cc.

◆ range()

Sptr< CIndex::RangeType > CNORXZ::CIndex::range ( ) const

pointer to the range the index is defined on

Definition at line 101 of file crange.cc.

◆ reformat()

CIndex & CNORXZ::CIndex::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 157 of file crange.cc.

◆ stepSize()

template<SizeT I>
decltype(auto) CNORXZ::CIndex::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 21 of file crange.cc.h.

◆ stringMeta()

String CNORXZ::CIndex::stringMeta ( ) const

return string formatted meta data at current index position

Definition at line 106 of file crange.cc.

◆ xpr()

COpRoot< SizeT, CIndex > CNORXZ::CIndex::xpr ( const Sptr< CIndex > & _this) const

Definition at line 122 of file crange.cc.


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