![]() |
CoMMA 1.3.2
A geometric agglomerator for unstructured meshes
|
An easy and straight forward implementation of a Bimap. More...
#include <Bimap.h>
Public Member Functions | |
| Bimap ()=default | |
| Constructor. More... | |
| ~Bimap ()=default | |
| Destructor. More... | |
| void | insert (const A &a, const B &b) |
| Insertion function in the Bimap. More... | |
| void | print () |
| Function to print the map. More... | |
| void | update_nodeB (const A &a_old, const A &a_new) |
| Update of the key of the map B and hence the value of the node A. More... | |
| void | update_nodeA (const B &b_old, const B &b_new) |
| Update of the key of the map A and hence the value of the node B. More... | |
| B | get_B (const A &a) |
| Getter of the B value starting from a A value. More... | |
| A | get_A (const B &b) |
| Getter of the A value starting from a B value. More... | |
| void | erase_B (const A &a) |
| Eraser of the value starting from a A value. More... | |
| bool | empty () |
| Check if the Bimap is empty. More... | |
| size_t | lung () |
| Returns the size of the container. More... | |
Protected Attributes | |
| std::map< B, const A * > | _mapA |
| Left map More... | |
| std::map< A, const B * > | _mapB |
| Right map. More... | |
An easy and straight forward implementation of a Bimap.
|
default |
Constructor.
|
default |
Destructor.
|
inline |
Check if the Bimap is empty.
|
inline |
Eraser of the value starting from a A value.
| [in] | a | the associated value we want to search in order to delete the relative entry |
|
inline |
Getter of the A value starting from a B value.
| [in] | b | the associated value we want to search |
b
|
inline |
Getter of the B value starting from a A value.
| [in] | a | the associated value we want to search |
a
|
inline |
Insertion function in the Bimap.
| [in] | a | element A to add |
| [in] | b | element B to add |
|
inline |
Returns the size of the container.
|
inline |
Function to print the map.
|
inline |
Update of the key of the map A and hence the value of the node B.
| [in] | b_old | the old value of the node B (in case you do not know you can find it through the find. |
| [in] | b_new | the new value we want to attribute to the node B. |
|
inline |
Update of the key of the map B and hence the value of the node A.
| [in] | a_old | the old value of the node A (in case you do not know you can find it through the find. |
| [in] | a_new | the new value we want to attribute to the node A. |
|
protected |
Left map
|
protected |
Right map.