libosmscout  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
osmscout::NodeUseMap Class Referencefinal

#include <NodeUseMap.h>

Public Member Functions

void Clear ()
 
size_t GetDuplicateCount () const
 
size_t GetNodeUsedCount () const
 
bool IsNodeUsedAtLeastTwice (Id id) const
 
 NodeUseMap ()
 
void SetNodeUsed (Id id)
 

Detailed Description

The NodeUseMap can be used to efficiently check if an id used at least twice. In concrete it is used, to check if a node id is shared by multiple ways/areas.

It is expected that ids are not sparse but continuously used. So while the data structure works for Id, it will likely not work for OSMId.

It internally used large bitsets in a hashset to allow efficient memory usage (only a few entries in hashtable to reduce management overhead but no need for large continuous memory areas) and at the same time fast access (O(1)) for reading and writing.

Constructor & Destructor Documentation

◆ NodeUseMap()

osmscout::NodeUseMap::NodeUseMap ( )

Member Function Documentation

◆ Clear()

void osmscout::NodeUseMap::Clear ( )

◆ GetDuplicateCount()

size_t osmscout::NodeUseMap::GetDuplicateCount ( ) const

◆ GetNodeUsedCount()

size_t osmscout::NodeUseMap::GetNodeUsedCount ( ) const

◆ IsNodeUsedAtLeastTwice()

bool osmscout::NodeUseMap::IsNodeUsedAtLeastTwice ( Id  id) const

◆ SetNodeUsed()

void osmscout::NodeUseMap::SetNodeUsed ( Id  id)

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