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

#include <xindex.h>

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

Public Member Functions

 DEFAULT_C (XIndex)
 
 XIndex (const XIndex &i)
 
 XIndex (XIndex &&i)
 
XIndexoperator= (const XIndex &i)
 
XIndexoperator= (XIndex &&i)
 
 XIndex (const IndexPtr< Index, Meta > &i)
 
 XIndex (const IndexInterface< Index, Meta > &i)
 
virtual XIndexPtr copy () const override final
 
virtual SizeT pos () const override final
 
virtual XIndexoperator= (SizeT lexpos) override final
 
virtual XIndexoperator++ () override final
 
virtual XIndexoperator-- () override final
 
virtual XIndexPtr operator+ (Int n) const override final
 
virtual XIndexPtr operator- (Int n) const override final
 
virtual SizeT operator- (const XIndexBase &i) const override final
 
virtual XIndexoperator+= (Int n) override final
 
virtual XIndexoperator-= (Int n) override final
 
virtual SizeT lex () const override final
 
virtual UPos pmax () const override final
 
virtual UPos lmax () const override final
 
virtual IndexId< 0 > id () const override final
 
virtual DType operator* () const override final
 
virtual SizeT dim () const override final
 
virtual RangePtr range () const override final
 
virtual UPos stepSize (const IndexId< 0 > &id) const override final
 
virtual String stringMeta () const override final
 
virtual DType meta () const override final
 
virtual XIndexBaseat (const DType &meta) override final
 
virtual RangePtr prange (const XIndexPtr &last) const override final
 
virtual Vector< SizeTdeepFormat () const override final
 
virtual Vector< SizeTdeepMax () const override final
 
virtual XIndexreformat (const Vector< SizeT > &f, const Vector< SizeT > &s) override final
 
virtual DXpr< Noneifor (const DXpr< None > &xpr, NoF &&f) const override final
 
virtual bool formatIsTrivial () const override final
 
Index & get ()
 
const Index & get () const
 
- Public Member Functions inherited from CNORXZ::XIndexBase
 DEFAULT_MEMBERS (XIndexBase)
 
virtual ~XIndexBase ()=default
 

Detailed Description

template<class Index, typename Meta>
class CNORXZ::XIndex< Index, Meta >

Index Wrapper.

Template Parameters
IndexType of index to be wrapped.
MetaMeta data type of wrapped index.

Definition at line 129 of file xindex.h.

Constructor & Destructor Documentation

◆ XIndex() [1/4]

template<class Index , typename Meta >
CNORXZ::XIndex< Index, Meta >::XIndex ( const XIndex< Index, Meta > & i)

< default constructor. Copy constructor. No default: have to copy objects in shared ptr.

◆ XIndex() [2/4]

template<class Index , typename Meta >
CNORXZ::XIndex< Index, Meta >::XIndex ( XIndex< Index, Meta > && i)

Move constructor.

◆ XIndex() [3/4]

template<class Index , typename Meta >
CNORXZ::XIndex< Index, Meta >::XIndex ( const IndexPtr< Index, Meta > & i)

Construct.

Parameters
iPointer to index to be wrapped.

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

◆ XIndex() [4/4]

template<class Index , typename Meta >
CNORXZ::XIndex< Index, Meta >::XIndex ( const IndexInterface< Index, Meta > & i)

Construct.

Parameters
iIndex to be wrapped.

Definition at line 29 of file xindex.cc.h.

Member Function Documentation

◆ at()

template<class Index , typename Meta >
XIndexBase & CNORXZ::XIndex< Index, Meta >::at ( const DType & meta)
finaloverridevirtual

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

Parameters
metameta data to be matched

Implements CNORXZ::XIndexBase.

Definition at line 186 of file xindex.cc.h.

◆ copy()

template<class Index , typename Meta >
XIndexPtr CNORXZ::XIndex< Index, Meta >::copy ( ) const
finaloverridevirtual

Copy this index

Returns
Pointer to the copy.

Implements CNORXZ::XIndexBase.

Definition at line 33 of file xindex.cc.h.

◆ deepFormat()

template<class Index , typename Meta >
Vector< SizeT > CNORXZ::XIndex< Index, Meta >::deepFormat ( ) const
finaloverridevirtual

recursive index format

Implements CNORXZ::XIndexBase.

Definition at line 155 of file xindex.cc.h.

◆ deepMax()

template<class Index , typename Meta >
Vector< SizeT > CNORXZ::XIndex< Index, Meta >::deepMax ( ) const
finaloverridevirtual

max of all single-indices (recursive)

Implements CNORXZ::XIndexBase.

Definition at line 161 of file xindex.cc.h.

◆ DEFAULT_C()

template<class Index , typename Meta >
CNORXZ::XIndex< Index, Meta >::DEFAULT_C ( XIndex< Index, Meta > )

◆ dim()

template<class Index , typename Meta >
SizeT CNORXZ::XIndex< Index, Meta >::dim ( ) const
finaloverridevirtual

index dimension

Implements CNORXZ::XIndexBase.

Definition at line 131 of file xindex.cc.h.

◆ formatIsTrivial()

template<class Index , typename Meta >
bool CNORXZ::XIndex< Index, Meta >::formatIsTrivial ( ) const
finaloverridevirtual

check is format is trivial

Implements CNORXZ::XIndexBase.

Definition at line 199 of file xindex.cc.h.

◆ get() [1/2]

template<class Index , typename Meta >
Index & CNORXZ::XIndex< Index, Meta >::get ( )

Get underlying index instance.

Returns
Reference to index.

Definition at line 205 of file xindex.cc.h.

◆ get() [2/2]

template<class Index , typename Meta >
const Index & CNORXZ::XIndex< Index, Meta >::get ( ) const

Get underlying index instance (const).

Returns
Reference to index.

Definition at line 211 of file xindex.cc.h.

◆ id()

template<class Index , typename Meta >
IndexId< 0 > CNORXZ::XIndex< Index, Meta >::id ( ) const
finaloverridevirtual

index ID

Implements CNORXZ::XIndexBase.

Definition at line 119 of file xindex.cc.h.

◆ ifor()

template<class Index , typename Meta >
DXpr< None > CNORXZ::XIndex< Index, Meta >::ifor ( const DXpr< None > & xpr,
NoF && f ) const
finaloverridevirtual

create a for-loop expression

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

Implements CNORXZ::XIndexBase.

Definition at line 193 of file xindex.cc.h.

◆ lex()

template<class Index , typename Meta >
SizeT CNORXZ::XIndex< Index, Meta >::lex ( ) const
finaloverridevirtual

lexicographic position

Implements CNORXZ::XIndexBase.

Definition at line 101 of file xindex.cc.h.

◆ lmax()

template<class Index , typename Meta >
UPos CNORXZ::XIndex< Index, Meta >::lmax ( ) const
finaloverridevirtual

maximal lexicographic position

Implements CNORXZ::XIndexBase.

Definition at line 113 of file xindex.cc.h.

◆ meta()

template<class Index , typename Meta >
DType CNORXZ::XIndex< Index, Meta >::meta ( ) const
finaloverridevirtual

return meta data at current index position

Implements CNORXZ::XIndexBase.

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

◆ operator*()

template<class Index , typename Meta >
DType CNORXZ::XIndex< Index, Meta >::operator* ( ) const
finaloverridevirtual

return meta data at current index position

Implements CNORXZ::XIndexBase.

Definition at line 125 of file xindex.cc.h.

◆ operator+()

template<class Index , typename Meta >
Sptr< XIndexBase > CNORXZ::XIndex< Index, Meta >::operator+ ( Int n) const
finaloverridevirtual

return index with lexicographic index position incremented n times

Parameters
n

Implements CNORXZ::XIndexBase.

Definition at line 67 of file xindex.cc.h.

◆ operator++()

template<class Index , typename Meta >
XIndex< Index, Meta > & CNORXZ::XIndex< Index, Meta >::operator++ ( )
finaloverridevirtual

increment lexicographic index position

Implements CNORXZ::XIndexBase.

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

◆ operator+=()

template<class Index , typename Meta >
XIndex< Index, Meta > & CNORXZ::XIndex< Index, Meta >::operator+= ( Int n)
finaloverridevirtual

increment lexicographic index position n times

Parameters
n

Implements CNORXZ::XIndexBase.

Definition at line 87 of file xindex.cc.h.

◆ operator-() [1/2]

template<class Index , typename Meta >
SizeT CNORXZ::XIndex< Index, Meta >::operator- ( const XIndexBase & i) const
finaloverridevirtual

Implements CNORXZ::XIndexBase.

Definition at line 79 of file xindex.cc.h.

◆ operator-() [2/2]

template<class Index , typename Meta >
Sptr< XIndexBase > CNORXZ::XIndex< Index, Meta >::operator- ( Int n) const
finaloverridevirtual

return index with lexicographic index position decremented n times

Parameters
n

Implements CNORXZ::XIndexBase.

Definition at line 73 of file xindex.cc.h.

◆ operator--()

template<class Index , typename Meta >
XIndex< Index, Meta > & CNORXZ::XIndex< Index, Meta >::operator-- ( )
finaloverridevirtual

decrement lexicographic index position

Implements CNORXZ::XIndexBase.

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

◆ operator-=()

template<class Index , typename Meta >
XIndex< Index, Meta > & CNORXZ::XIndex< Index, Meta >::operator-= ( Int n)
finaloverridevirtual

decrement lexicographic index position n times

Parameters
n

Implements CNORXZ::XIndexBase.

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

◆ operator=() [1/3]

template<class Index , typename Meta >
XIndex & CNORXZ::XIndex< Index, Meta >::operator= ( const XIndex< Index, Meta > & i)

Copy assignment. No default: have to copy objects in shared ptr.

◆ operator=() [2/3]

template<class Index , typename Meta >
XIndex< Index, Meta > & CNORXZ::XIndex< Index, Meta >::operator= ( SizeT lexpos)
finaloverridevirtual

Implements CNORXZ::XIndexBase.

Definition at line 45 of file xindex.cc.h.

◆ operator=() [3/3]

template<class Index , typename Meta >
XIndex & CNORXZ::XIndex< Index, Meta >::operator= ( XIndex< Index, Meta > && i)

Move assignment.

◆ pmax()

template<class Index , typename Meta >
UPos CNORXZ::XIndex< Index, Meta >::pmax ( ) const
finaloverridevirtual

maximal memory position

Implements CNORXZ::XIndexBase.

Definition at line 107 of file xindex.cc.h.

◆ pos()

template<class Index , typename Meta >
SizeT CNORXZ::XIndex< Index, Meta >::pos ( ) const
finaloverridevirtual

Current position.

Returns
Current position.

Implements CNORXZ::XIndexBase.

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

◆ prange()

template<class Index , typename Meta >
RangePtr CNORXZ::XIndex< Index, Meta >::prange ( const XIndexPtr & last) const
finaloverridevirtual

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

Parameters
endend index

Implements CNORXZ::XIndexBase.

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

◆ range()

template<class Index , typename Meta >
RangePtr CNORXZ::XIndex< Index, Meta >::range ( ) const
finaloverridevirtual

pointer to the range the index is defined on

Implements CNORXZ::XIndexBase.

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

◆ reformat()

template<class Index , typename Meta >
XIndex< Index, Meta > & CNORXZ::XIndex< Index, Meta >::reformat ( const Vector< SizeT > & f,
const Vector< SizeT > & s )
finaloverridevirtual

reformat index, create new index instance

Parameters
fnew format
snew sub-index sizes

Implements CNORXZ::XIndexBase.

Definition at line 167 of file xindex.cc.h.

◆ stepSize()

template<class Index , typename Meta >
UPos CNORXZ::XIndex< Index, Meta >::stepSize ( const IndexId< 0 > & id) const
finaloverridevirtual

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

Implements CNORXZ::XIndexBase.

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

◆ stringMeta()

template<class Index , typename Meta >
String CNORXZ::XIndex< Index, Meta >::stringMeta ( ) const
finaloverridevirtual

return string formatted meta data at current index position

Implements CNORXZ::XIndexBase.

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


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