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

The NodeUseMap can be used to efficiently check if an id used at least twice. More...

#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)
 
virtual ~NodeUseMap ()
 

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

osmscout::NodeUseMap::NodeUseMap ( )
osmscout::NodeUseMap::~NodeUseMap ( )
virtual

Member Function Documentation

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

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