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

#include <index_pack.h>

Public Member Functions

 DEFAULT_MEMBERS (DPack)
 
 DPack (const Vector< XIndexPtr > &is)
 
 DPack (Vector< XIndexPtr > &&is)
 
template<class... Indices>
 DPack (const SPack< Indices... > &p)
 
const Vector< XIndexPtr > & all () const
 
SizeT size () const
 
const XIndexPtrget (SizeT i) const
 
const XIndexPtroperator[] (SizeT i) const
 
DPack rmul (const Sptr< DIndex > &i) const
 
DPack lmul (const Sptr< DIndex > &i) const
 
DPack mul (const DPack &p) const
 
RangePtr mkRange () const
 
SizeT lex () const
 
SizeT pos () const
 

Detailed Description


Dynamic index pack. Containes array of shared pointers to XIndex instances.

Definition at line 133 of file index_pack.h.

Constructor & Destructor Documentation

◆ DPack() [1/3]

CNORXZ::DPack::DPack ( const Vector< XIndexPtr > & is)
explicit

Create pack from XIndex instance

Parameters
isVector of XIndex pointers

Definition at line 16 of file index_pack.cc.

◆ DPack() [2/3]

CNORXZ::DPack::DPack ( Vector< XIndexPtr > && is)
explicit

Create pack from XIndex instance (move input vector)

Parameters
isVector of XIndex pointers

Definition at line 20 of file index_pack.cc.

◆ DPack() [3/3]

template<class... Indices>
CNORXZ::DPack::DPack ( const SPack< Indices... > & p)
explicit

Create pack from a static pack (SPack)

Parameters
pstatic pack used for construction

Definition at line 121 of file index_pack.cc.h.

Member Function Documentation

◆ all()

const Vector< XIndexPtr > & CNORXZ::DPack::all ( ) const

get underlying index pointer vector

Returns
underlying index pointer vector

Definition at line 24 of file index_pack.cc.

◆ DEFAULT_MEMBERS()

CNORXZ::DPack::DEFAULT_MEMBERS ( DPack )

default constructors and assignments

◆ get()

const XIndexPtr & CNORXZ::DPack::get ( SizeT i) const

get pack element

Returns
i'th element of the pack
Parameters
iPosition

Definition at line 34 of file index_pack.cc.

◆ lex()

SizeT CNORXZ::DPack::lex ( ) const

Get lexicographic position if pack was transformed to a (trivial) multi-index.

Returns
lexicographic position

Definition at line 77 of file index_pack.cc.

◆ lmul()

DPack CNORXZ::DPack::lmul ( const Sptr< DIndex > & i) const

Append index on the l.h.s.

Parameters
iDIndex to be appended

Definition at line 51 of file index_pack.cc.

◆ mkRange()

RangePtr CNORXZ::DPack::mkRange ( ) const

create a range from the index pack

Returns
created range

Definition at line 69 of file index_pack.cc.

◆ mul()

DPack CNORXZ::DPack::mul ( const DPack & p) const

Append pack on the r.h.s.

Parameters
pPack to be appnded

Definition at line 60 of file index_pack.cc.

◆ operator[]()

const XIndexPtr & CNORXZ::DPack::operator[] ( SizeT i) const

get pack element

Returns
i'th element of the pack
Parameters
iPosition

Definition at line 39 of file index_pack.cc.

◆ pos()

SizeT CNORXZ::DPack::pos ( ) const

Get lexicographic position if pack was transformed to a (trivial) multi-index.

Returns
lexicographic position

Definition at line 91 of file index_pack.cc.

◆ rmul()

DPack CNORXZ::DPack::rmul ( const Sptr< DIndex > & i) const

Append index on the r.h.s.

Parameters
iDIndex to be appended

Definition at line 44 of file index_pack.cc.

◆ size()

SizeT CNORXZ::DPack::size ( ) const

get pack size i.e. dimension (non-recursive)

Returns
pack size

Definition at line 29 of file index_pack.cc.


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