WARPXM v1.10.0
Loading...
Searching...
No Matches
WmIndexer< TYPE > Class Template Reference

template<typename T> class WxArray; More...

#include <wmindexer.h>

Detailed Description

template<int TYPE = 1>
class WmIndexer< TYPE >

template<typename T> class WxArray;

WmIndexer provides a way to map an element of an n-dimensional index set into a single integer.

Public Member Functions

 WmIndexer ()
 The default constructor creates an empty WmIndexer object.
 
 WmIndexer (const WxRange &r)
 Constructs indexer for a given range.
 
 WmIndexer (unsigned rank, int *ai, const WxRange &r)
 
 ~WmIndexer ()
 
 WmIndexer (const WmIndexer &idx)
 
WmIndexeroperator= (const WmIndexer &idx)
 
unsigned rank () const
 Rank of indexer.
 
const WxRangerange () const
 Range of set indexed.
 
int index (int k1) const
 Index 1D array.
 
int index (int k1, int k2) const
 Index 2D array.
 
int index (int k1, int k2, int k3) const
 Index 3D array.
 
int index (int k1, int k2, int k3, int k4) const
 Index 4D array.
 
int index (const int *k) const
 Index arbitrary dimensional array.
 
int * invIndex (unsigned loc, int *indicesReturn) const
 Return index location given a linear offset.
 
int index (int k1) const
 
int index (int k1, int k2) const
 
int index (int k1, int k2, int k3) const
 
int index (int k1, int k2, int k3, int k4) const
 
int * invIndex (unsigned loc, int *indicesReturn) const
 
int index (int k1) const
 
int index (int k1, int k2) const
 
int index (int k1, int k2, int k3) const
 
int index (int k1, int k2, int k3, int k4) const
 
int * invIndex (unsigned loc, int *indicesReturn) const
 

Constructor & Destructor Documentation

◆ WmIndexer()

template<int TYPE = 1>
WmIndexer< TYPE >::WmIndexer ( const WxRange r)

Constructs indexer for a given range.

Parameters
rRange over which indexer is required

Member Function Documentation

◆ index() [1/12]

template<int TYPE = 1>
int WmIndexer< TYPE >::index ( int  k1) const

Index 1D array.

◆ index() [2/12]

int WmIndexer< 1 >::index ( int  k1) const
inline

◆ index() [3/12]

int WmIndexer< 2 >::index ( int  k1) const
inline

◆ index() [4/12]

template<int TYPE = 1>
int WmIndexer< TYPE >::index ( int  k1,
int  k2 
) const

Index 2D array.

◆ index() [5/12]

int WmIndexer< 1 >::index ( int  k1,
int  k2 
) const
inline

◆ index() [6/12]

int WmIndexer< 2 >::index ( int  k1,
int  k2 
) const
inline

◆ index() [7/12]

template<int TYPE = 1>
int WmIndexer< TYPE >::index ( int  k1,
int  k2,
int  k3 
) const

Index 3D array.

◆ index() [8/12]

int WmIndexer< 1 >::index ( int  k1,
int  k2,
int  k3 
) const
inline

◆ index() [9/12]

int WmIndexer< 2 >::index ( int  k1,
int  k2,
int  k3 
) const
inline

◆ index() [10/12]

template<int TYPE = 1>
int WmIndexer< TYPE >::index ( int  k1,
int  k2,
int  k3,
int  k4 
) const

Index 4D array.

◆ index() [11/12]

int WmIndexer< 1 >::index ( int  k1,
int  k2,
int  k3,
int  k4 
) const
inline

◆ index() [12/12]

int WmIndexer< 2 >::index ( int  k1,
int  k2,
int  k3,
int  k4 
) const
inline

◆ invIndex() [1/3]

template<int TYPE = 1>
int * WmIndexer< TYPE >::invIndex ( unsigned  loc,
int *  indicesReturn 
) const

Return index location given a linear offset.

User responsible to ensure return array large enough given range rank.

Parameters
loclinear offset
indicesReturnindices as an array placed here.
Returns
also returns address of returned indices

◆ invIndex() [2/3]

int * WmIndexer< 1 >::invIndex ( unsigned  loc,
int *  indicesReturn 
) const
inline

◆ invIndex() [3/3]

int * WmIndexer< 2 >::invIndex ( unsigned  loc,
int *  indicesReturn 
) const
inline

◆ range()

template<int TYPE = 1>
const WxRange & WmIndexer< TYPE >::range ( ) const
inline

Range of set indexed.

◆ rank()

template<int TYPE = 1>
unsigned WmIndexer< TYPE >::rank ( ) const
inline

Rank of indexer.


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