An invertible mapping from indices in [0,imax), which operates in two modes: offset mode adds an offset, and mapping mode stores an explicit mapping.
More...
#include <ArrayMapping.h>
|
bool | IsOffset () const |
|
int | Size () const |
|
void | SetOffset (int offset, int imax) |
|
int | Map (int i) const |
|
int | InvMap (int imap) const |
|
template<class A > |
void | Map (const A &x, A &mapx) const |
|
template<class A > |
void | InvMap (const A &mapx, A &x) const |
|
|
std::vector< int > | mapping |
|
int | imax |
|
int | offset |
|
An invertible mapping from indices in [0,imax), which operates in two modes: offset mode adds an offset, and mapping mode stores an explicit mapping.
Maps array indices i in [0,imax) to either:
- (i+offset)
- (mapping[i]) (if the mapping is defined) Map method 1 maps an index to its target value. Map method 2 maps values from x to mapx, that is, mapx[Map(i)] <- x[i] InvMap method 1 maps a target value to an index, or < 0 if the value is not in the map's range. InvMap method 2 maps values from mapx to x, that is, x[InvMap(i)] <- mapx[i]
The documentation for this struct was generated from the following file: