9 #ifndef MESHPOINTIDTOGLOBALIDMAP_HPP_
10 #define MESHPOINTIDTOGLOBALIDMAP_HPP_
15 namespace Rocstar {
namespace Rocin {
namespace Utilities {
44 inline bool exists(
const int meshPaneId,
const int meshPointId )
46 std::pair< int, int > keyPair = std::make_pair( meshPaneId, meshPointId );
47 if(
this ->
local2global.find( keyPair ) !=
this ->local2global.end( ) )
61 inline int getGlobalId(
const int meshPaneId,
const int meshPointId )
63 std::pair< int, int > keyPair = std::make_pair( meshPaneId, meshPointId );
64 if(
this ->
local2global.find( keyPair ) !=
this ->local2global.end( ) )
80 inline void insert(
const int meshPaneId,
const int meshPointId,
const int globalId )
89 assert( globalId >= 0 );
90 assert( meshPointId >= 0);
91 assert( !
this ->
exists( meshPaneId, meshPointId ) );
94 std::pair< int, int > keyPair = std::make_pair( meshPaneId, meshPointId );
95 this ->local2global[ keyPair ] = globalId;
98 assert(
this ->
exists( meshPaneId, meshPointId ) );
108 inline int size( )
const {
return this ->local2global.size( ); }
std::map< std::pair< int, int >, int > local2global
MeshPointIdToGlobalIdMap()
Constructor.
int size() const
Returns the size of the map.
bool exists(const int meshPaneId, const int meshPointId)
Checks if the point meshPointId of the mesh associated with the provided meshPaneId exists in this Me...
int getGlobalId(const int meshPaneId, const int meshPointId)
Returns the assigned global id to meshPointId of the mesh associated with the provided meshPaneId...
void insert(const int meshPaneId, const int meshPointId, const int globalId)
This method constructs a new key-pair for the meshPaneId and meshPointId which maps into globalId and...
~MeshPointIdToGlobalIdMap()
Destructor.