openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
|
Index mapping class. This is a bijective mapping. More...
#include <SF_container.h>
Public Member Functions | |
index_mapping () | |
empty constructor. More... | |
index_mapping (const vector< T > &a, const vector< T > &b) | |
Constructor that uses assign() to set up the index mapping. More... | |
void | assign (const vector< T > &a, const vector< T > &b) |
Set up the index mapping between a and b. More... | |
T | forward_map (T idx) const |
Map one index from a to b. More... | |
T | backward_map (T idx) const |
Map one index from b to a. More... | |
void | forward_map (vector< T > &idx) const |
Map a whole array of indices in a to indices in b. More... | |
void | backward_map (vector< T > &idx) const |
Map a whole array of indices in b to indices in a. More... | |
size_t | size () const |
number of entries in bijective map More... | |
bool | in_a (const T idx) |
return whether idx is in set A More... | |
bool | in_b (const T idx) |
return whether idx is in set B More... | |
const hashmap::unordered_map< T, T > & | get_fwd_map () const |
const hashmap::unordered_map< T, T > & | get_bwd_map () const |
hashmap::unordered_map< T, T > & | get_fwd_map () |
hashmap::unordered_map< T, T > & | get_bwd_map () |
Index mapping class. This is a bijective mapping.
Usually used to map indices between two different numberings.
Definition at line 207 of file SF_container.h.
|
inline |
empty constructor.
Definition at line 215 of file SF_container.h.
|
inline |
Constructor that uses assign() to set up the index mapping.
a | Index set a. |
b | Index set b. |
Definition at line 224 of file SF_container.h.
|
inline |
Set up the index mapping between a and b.
a | Index set a. |
b | Index set b. |
Definition at line 235 of file SF_container.h.
|
inline |
Map one index from b to a.
Definition at line 262 of file SF_container.h.
|
inline |
Map a whole array of indices in b to indices in a.
There is a performance advantage compared to mapping individual indices when indices in idx are stored multiple times.
idx | Vector holding indices. |
Definition at line 316 of file SF_container.h.
|
inline |
Map one index from a to b.
Definition at line 252 of file SF_container.h.
|
inline |
Map a whole array of indices in a to indices in b.
There is a performance advantage compared to mapping individual indices when indices in idx are stored multiple times.
idx | Vector holding indices. |
Definition at line 280 of file SF_container.h.
|
inline |
Definition at line 363 of file SF_container.h.
|
inline |
Definition at line 373 of file SF_container.h.
|
inline |
Definition at line 358 of file SF_container.h.
|
inline |
Definition at line 368 of file SF_container.h.
|
inline |
return whether idx is in set A
Definition at line 350 of file SF_container.h.
|
inline |
return whether idx is in set B
Definition at line 354 of file SF_container.h.
|
inline |
number of entries in bijective map
Definition at line 345 of file SF_container.h.