ROSE 0.11.145.147
Public Member Functions | List of all members
Sawyer::Container::GraphHashIndex< VertexOrEdgeKey, VertexOrEdgeConstIterator > Class Template Reference

Description

template<class VertexOrEdgeKey, class VertexOrEdgeConstIterator>
class Sawyer::Container::GraphHashIndex< VertexOrEdgeKey, VertexOrEdgeConstIterator >

Hash-based indexing.

This index has O(N) insert, erase, and lookup times, although nominally the times are constant because the index uses hashing. The vertex or edge keys must have a hash function appropriate for boost::unordered_map and an equality operator.

The semantics for each of the class methods are documented in GraphVoidIndex.

Definition at line 193 of file Graph.h.

#include <Sawyer/Graph.h>

Public Member Functions

void clear ()
 Erase all data from this index.
 
void insert (const VertexOrEdgeKey &key, const VertexOrEdgeConstIterator &iter)
 Insert a new element into the map.
 
void erase (const VertexOrEdgeKey &key)
 Erase an element from the map.
 
Optional< VertexOrEdgeConstIterator > lookup (const VertexOrEdgeKey &key) const
 Lookup iterator for vertex or edge key.
 

Member Function Documentation

◆ clear()

template<class VertexOrEdgeKey , class VertexOrEdgeConstIterator >
void Sawyer::Container::GraphHashIndex< VertexOrEdgeKey, VertexOrEdgeConstIterator >::clear ( )
inline

Erase all data from this index.

See GraphVoidIndex::clear.

Definition at line 200 of file Graph.h.

◆ insert()

template<class VertexOrEdgeKey , class VertexOrEdgeConstIterator >
void Sawyer::Container::GraphHashIndex< VertexOrEdgeKey, VertexOrEdgeConstIterator >::insert ( const VertexOrEdgeKey &  key,
const VertexOrEdgeConstIterator &  iter 
)
inline

Insert a new element into the map.

See GraphVoidIndex::insert.

Definition at line 207 of file Graph.h.

◆ erase()

template<class VertexOrEdgeKey , class VertexOrEdgeConstIterator >
void Sawyer::Container::GraphHashIndex< VertexOrEdgeKey, VertexOrEdgeConstIterator >::erase ( const VertexOrEdgeKey &  key)
inline

Erase an element from the map.

See GraphVoidIndex::erase.

Definition at line 214 of file Graph.h.

◆ lookup()

template<class VertexOrEdgeKey , class VertexOrEdgeConstIterator >
Optional< VertexOrEdgeConstIterator > Sawyer::Container::GraphHashIndex< VertexOrEdgeKey, VertexOrEdgeConstIterator >::lookup ( const VertexOrEdgeKey &  key) const
inline

Lookup iterator for vertex or edge key.

See GraphVoidIndex::lookup.

Definition at line 221 of file Graph.h.


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