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

#include <xindex.h>

Inheritance diagram for CNORXZ::XIndexBase:
CNORXZ::XIndex< Index, Meta >

Public Member Functions

 DEFAULT_MEMBERS (XIndexBase)
 
virtual ~XIndexBase ()=default
 
virtual XIndexPtr copy () const =0
 
virtual SizeT pos () const =0
 
virtual XIndexBaseoperator= (SizeT lexpos)=0
 
virtual XIndexBaseoperator++ ()=0
 
virtual XIndexBaseoperator-- ()=0
 
virtual XIndexPtr operator+ (Int n) const =0
 
virtual XIndexPtr operator- (Int n) const =0
 
virtual SizeT operator- (const XIndexBase &i) const =0
 
virtual XIndexBaseoperator+= (Int n)=0
 
virtual XIndexBaseoperator-= (Int n)=0
 
virtual SizeT lex () const =0
 
virtual UPos pmax () const =0
 
virtual UPos lmax () const =0
 
virtual IndexId< 0 > id () const =0
 
virtual DType operator* () const =0
 
virtual SizeT dim () const =0
 
virtual RangePtr range () const =0
 
virtual UPos stepSize (const IndexId< 0 > &id) const =0
 
virtual String stringMeta () const =0
 
virtual DType meta () const =0
 
virtual XIndexBaseat (const DType &meta)=0
 
virtual RangePtr prange (const XIndexPtr &last) const =0
 
virtual Vector< SizeTdeepFormat () const =0
 
virtual Vector< SizeTdeepMax () const =0
 
virtual XIndexBasereformat (const Vector< SizeT > &f, const Vector< SizeT > &s)=0
 
virtual DXpr< Noneifor (const DXpr< None > &xpr, NoF &&f) const =0
 
virtual bool formatIsTrivial () const =0
 

Detailed Description


Abstract index wrapper base. Can be used for index polymorphism. Only use if absolutely necessary, indices should always reveal as much as possible to the compiler!

Definition at line 28 of file xindex.h.

Constructor & Destructor Documentation

◆ ~XIndexBase()

virtual CNORXZ::XIndexBase::~XIndexBase ( )
virtualdefault

Virtual default destructor

Member Function Documentation

◆ at()

virtual XIndexBase & CNORXZ::XIndexBase::at ( const DType & meta)
pure virtual

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

Parameters
metameta data to be matched

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ copy()

virtual XIndexPtr CNORXZ::XIndexBase::copy ( ) const
pure virtual

Copy this index

Returns
Pointer to the copy.

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ deepFormat()

virtual Vector< SizeT > CNORXZ::XIndexBase::deepFormat ( ) const
pure virtual

recursive index format

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ deepMax()

virtual Vector< SizeT > CNORXZ::XIndexBase::deepMax ( ) const
pure virtual

max of all single-indices (recursive)

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ DEFAULT_MEMBERS()

CNORXZ::XIndexBase::DEFAULT_MEMBERS ( XIndexBase )

default constructors and assignments

◆ dim()

virtual SizeT CNORXZ::XIndexBase::dim ( ) const
pure virtual

index dimension

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ formatIsTrivial()

virtual bool CNORXZ::XIndexBase::formatIsTrivial ( ) const
pure virtual

check is format is trivial

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ id()

virtual IndexId< 0 > CNORXZ::XIndexBase::id ( ) const
pure virtual

index ID

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ ifor()

virtual DXpr< None > CNORXZ::XIndexBase::ifor ( const DXpr< None > & xpr,
NoF && f ) const
pure virtual

create a for-loop expression

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

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ lex()

virtual SizeT CNORXZ::XIndexBase::lex ( ) const
pure virtual

lexicographic position

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ lmax()

virtual UPos CNORXZ::XIndexBase::lmax ( ) const
pure virtual

maximal lexicographic position

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ meta()

virtual DType CNORXZ::XIndexBase::meta ( ) const
pure virtual

return meta data at current index position

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ operator*()

virtual DType CNORXZ::XIndexBase::operator* ( ) const
pure virtual

return meta data at current index position

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ operator+()

virtual XIndexPtr CNORXZ::XIndexBase::operator+ ( Int n) const
pure virtual

return index with lexicographic index position incremented n times

Parameters
n

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ operator++()

virtual XIndexBase & CNORXZ::XIndexBase::operator++ ( )
pure virtual

increment lexicographic index position

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ operator+=()

virtual XIndexBase & CNORXZ::XIndexBase::operator+= ( Int n)
pure virtual

increment lexicographic index position n times

Parameters
n

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ operator-() [1/2]

virtual SizeT CNORXZ::XIndexBase::operator- ( const XIndexBase & i) const
pure virtual

◆ operator-() [2/2]

virtual XIndexPtr CNORXZ::XIndexBase::operator- ( Int n) const
pure virtual

return index with lexicographic index position decremented n times

Parameters
n

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ operator--()

virtual XIndexBase & CNORXZ::XIndexBase::operator-- ( )
pure virtual

decrement lexicographic index position

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ operator-=()

virtual XIndexBase & CNORXZ::XIndexBase::operator-= ( Int n)
pure virtual

decrement lexicographic index position n times

Parameters
n

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ operator=()

virtual XIndexBase & CNORXZ::XIndexBase::operator= ( SizeT lexpos)
pure virtual

◆ pmax()

virtual UPos CNORXZ::XIndexBase::pmax ( ) const
pure virtual

maximal memory position

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ pos()

virtual SizeT CNORXZ::XIndexBase::pos ( ) const
pure virtual

Current position.

Returns
Current position.

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ prange()

virtual RangePtr CNORXZ::XIndexBase::prange ( const XIndexPtr & last) const
pure virtual

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

Parameters
endend index

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ range()

virtual RangePtr CNORXZ::XIndexBase::range ( ) const
pure virtual

pointer to the range the index is defined on

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ reformat()

virtual XIndexBase & CNORXZ::XIndexBase::reformat ( const Vector< SizeT > & f,
const Vector< SizeT > & s )
pure virtual

reformat index, create new index instance

Parameters
fnew format
snew sub-index sizes

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ stepSize()

virtual UPos CNORXZ::XIndexBase::stepSize ( const IndexId< 0 > & id) const
pure virtual

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

Implemented in CNORXZ::XIndex< Index, Meta >.

◆ stringMeta()

virtual String CNORXZ::XIndexBase::stringMeta ( ) const
pure virtual

return string formatted meta data at current index position

Implemented in CNORXZ::XIndex< Index, Meta >.


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