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

#include <srange.h>

Inheritance diagram for CNORXZ::SIndex< MetaT, S >:
CNORXZ::IndexInterface< SIndex< MetaT, S >, MetaT > CNORXZ::LIndex< SIndex< MetaT, S >, L > CNORXZ::EIndex< MetaT, S, L >

Public Types

typedef IndexInterface< SIndex< MetaT, S >, MetaTIB
 
typedef SRange< MetaT, SRangeType
 
typedef MetaT MetaType
 

Public Member Functions

 INDEX_RANDOM_ACCESS_ITERATOR_DEFS (MetaType)
 
 DEFAULT_MEMBERS (SIndex)
 
 SIndex (const RangePtr &range, SizeT pos=0)
 
SIndexoperator= (SizeT lexpos)
 
SIndexoperator++ ()
 
SIndexoperator-- ()
 
SIndex operator+ (Int n) const
 
SIndex operator- (Int n) const
 
SizeT operator- (const SIndex &i) const
 
SIndexoperator+= (Int n)
 
SIndexoperator-= (Int n)
 
SizeT lex () const
 
SPos< Spmax () const
 
SPos< Slmax () const
 
IndexId< 0 > id () const
 
const MetaToperator* () const
 
SizeT dim () const
 
Sptr< RangeTyperange () const
 
template<SizeT I>
UPos stepSize (const IndexId< I > &id) const
 
String stringMeta () const
 
const MetaTmeta () const
 
SIndexat (const MetaT &metaPos)
 
RangePtr prange (const SIndex< MetaType, S > &last) const
 
SizeT deepFormat () const
 
SizeT deepMax () const
 
SIndexreformat (const Vector< SizeT > &f, const Vector< SizeT > &s)
 
decltype(autoxpr (const Sptr< SIndex< MetaType, S > > &_this) const
 
template<class Xpr , class F >
decltype(autoifor (const Xpr &xpr, F &&f) const
 
bool formatIsTrivial () const
 
- Public Member Functions inherited from CNORXZ::IndexInterface< SIndex< MetaT, S >, MetaT >
 ~IndexInterface ()=default
 
SIndex< MetaT, S > & THIS ()
 
const SIndex< MetaT, S > & THIS () const
 
SIndex< MetaT, S > & operator++ ()
 
SIndex< MetaT, S > & operator-- ()
 
SIndex< MetaT, S > operator+ (Int n) const
 
SIndex< MetaT, S > operator- (Int n) const
 
Int operator- (const IndexInterface &i) const
 
SIndex< MetaT, S > & operator+= (Int n)
 
SIndex< MetaT, S > & 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
 
SIndex< MetaT, S > & at (const MetaT &meta)
 
RangePtr prange (const IndexInterface &end) const
 
decltype(auto) deepFormat () const
 
decltype(auto) deepMax () const
 
SIndex< MetaT, S > & 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< SIndex< MetaT, S >, MetaT >
SizeT mPos
 

Detailed Description

template<typename MetaT, SizeT S>
class CNORXZ::SIndex< MetaT, S >

Specific index for SRange.

Template Parameters
MetaTMeta data type.
SStatic size of the range.

Definition at line 28 of file srange.h.

Member Typedef Documentation

◆ IB

Definition at line 31 of file srange.h.

◆ MetaType

template<typename MetaT , SizeT S>
typedef MetaT CNORXZ::SIndex< MetaT, S >::MetaType

Definition at line 33 of file srange.h.

◆ RangeType

template<typename MetaT , SizeT S>
typedef SRange<MetaT,S> CNORXZ::SIndex< MetaT, S >::RangeType

Definition at line 32 of file srange.h.

Constructor & Destructor Documentation

◆ SIndex()

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

Construct index from range and position.

Parameters
rangeRange to iterate over.
poslexicographic position.

Definition at line 25 of file srange.cc.h.

Member Function Documentation

◆ at()

template<typename MetaT , SizeT S>
SIndex< MetaT, S > & CNORXZ::SIndex< MetaT, S >::at ( const MetaT & metaPos)

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

Parameters
metameta data to be matched

Definition at line 149 of file srange.cc.h.

◆ deepFormat()

template<typename MetaT , SizeT S>
SizeT CNORXZ::SIndex< MetaT, S >::deepFormat ( ) const

recursive index format

Definition at line 174 of file srange.cc.h.

◆ deepMax()

template<typename MetaT , SizeT S>
SizeT CNORXZ::SIndex< MetaT, S >::deepMax ( ) const

max of all single-indices (recursive)

Definition at line 180 of file srange.cc.h.

◆ DEFAULT_MEMBERS()

template<typename MetaT , SizeT S>
CNORXZ::SIndex< MetaT, S >::DEFAULT_MEMBERS ( SIndex< MetaT, S > )

default constructors and assignments

◆ dim()

template<typename MetaT , SizeT S>
SizeT CNORXZ::SIndex< MetaT, S >::dim ( ) const

index dimension

Definition at line 118 of file srange.cc.h.

◆ formatIsTrivial()

template<typename MetaT , SizeT S>
bool CNORXZ::SIndex< MetaT, S >::formatIsTrivial ( ) const

check is format is trivial

Definition at line 203 of file srange.cc.h.

◆ id()

template<typename MetaT , SizeT S>
IndexId< 0 > CNORXZ::SIndex< MetaT, S >::id ( ) const

index ID

Definition at line 106 of file srange.cc.h.

◆ ifor()

template<typename MetaT , SizeT S>
template<class Xpr , class F >
decltype(auto) CNORXZ::SIndex< MetaT, S >::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 197 of file srange.cc.h.

◆ INDEX_RANDOM_ACCESS_ITERATOR_DEFS()

template<typename MetaT , SizeT S>
CNORXZ::SIndex< MetaT, S >::INDEX_RANDOM_ACCESS_ITERATOR_DEFS ( MetaType )

◆ lex()

template<typename MetaT , SizeT S>
SizeT CNORXZ::SIndex< MetaT, S >::lex ( ) const

lexicographic position

Definition at line 88 of file srange.cc.h.

◆ lmax()

template<typename MetaT , SizeT S>
SPos< S > CNORXZ::SIndex< MetaT, S >::lmax ( ) const

maximal lexicographic position

Definition at line 100 of file srange.cc.h.

◆ meta()

template<typename MetaT , SizeT S>
const MetaT & CNORXZ::SIndex< MetaT, S >::meta ( ) const

return meta data at current index position

Definition at line 143 of file srange.cc.h.

◆ operator*()

template<typename MetaT , SizeT S>
const MetaT & CNORXZ::SIndex< MetaT, S >::operator* ( ) const

return meta data at current index position

Definition at line 112 of file srange.cc.h.

◆ operator+()

template<typename MetaT , SizeT S>
SIndex< MetaT, S > CNORXZ::SIndex< MetaT, S >::operator+ ( Int n) const

return index with lexicographic index position incremented n times

Parameters
n

Definition at line 56 of file srange.cc.h.

◆ operator++()

template<typename MetaT , SizeT S>
SIndex< MetaT, S > & CNORXZ::SIndex< MetaT, S >::operator++ ( )

increment lexicographic index position

Definition at line 42 of file srange.cc.h.

◆ operator+=()

template<typename MetaT , SizeT S>
SIndex< MetaT, S > & CNORXZ::SIndex< MetaT, S >::operator+= ( Int n)

increment lexicographic index position n times

Parameters
n

Definition at line 74 of file srange.cc.h.

◆ operator-() [1/2]

template<typename MetaT , SizeT S>
SizeT CNORXZ::SIndex< MetaT, S >::operator- ( const SIndex< MetaT, S > & i) const

Definition at line 68 of file srange.cc.h.

◆ operator-() [2/2]

template<typename MetaT , SizeT S>
SIndex< MetaT, S > CNORXZ::SIndex< MetaT, S >::operator- ( Int n) const

return index with lexicographic index position decremented n times

Parameters
n

Definition at line 62 of file srange.cc.h.

◆ operator--()

template<typename MetaT , SizeT S>
SIndex< MetaT, S > & CNORXZ::SIndex< MetaT, S >::operator-- ( )

decrement lexicographic index position

Definition at line 49 of file srange.cc.h.

◆ operator-=()

template<typename MetaT , SizeT S>
SIndex< MetaT, S > & CNORXZ::SIndex< MetaT, S >::operator-= ( Int n)

decrement lexicographic index position n times

Parameters
n

Definition at line 81 of file srange.cc.h.

◆ operator=()

template<typename MetaT , SizeT S>
SIndex< MetaT, S > & CNORXZ::SIndex< MetaT, S >::operator= ( SizeT lexpos)

Definition at line 35 of file srange.cc.h.

◆ pmax()

template<typename MetaT , SizeT S>
SPos< S > CNORXZ::SIndex< MetaT, S >::pmax ( ) const

maximal memory position

Definition at line 94 of file srange.cc.h.

◆ prange()

template<typename MetaT , SizeT S>
RangePtr CNORXZ::SIndex< MetaT, S >::prange ( const SIndex< MetaType, S > & 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 162 of file srange.cc.h.

◆ range()

template<typename MetaT , SizeT S>
Sptr< SRange< MetaT, S > > CNORXZ::SIndex< MetaT, S >::range ( ) const

pointer to the range the index is defined on

Definition at line 124 of file srange.cc.h.

◆ reformat()

template<typename MetaT , SizeT S>
SIndex< MetaT, S > & CNORXZ::SIndex< MetaT, S >::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 186 of file srange.cc.h.

◆ stepSize()

template<typename MetaT , SizeT S>
template<SizeT I>
UPos CNORXZ::SIndex< MetaT, S >::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 131 of file srange.cc.h.

◆ stringMeta()

template<typename MetaT , SizeT S>
String CNORXZ::SIndex< MetaT, S >::stringMeta ( ) const

return string formatted meta data at current index position

Definition at line 137 of file srange.cc.h.

◆ xpr()

template<typename MetaT , SizeT S>
decltype(auto) CNORXZ::SIndex< MetaT, S >::xpr ( const Sptr< SIndex< MetaType, S > > & _this) const

create a for-loop expression

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

Definition at line 156 of file srange.cc.h.


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