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

Description

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

Fake index for graphs that don't have an index.

This is the index type used when a vertex or edge index is not required. It has no storage and constant lookup times. The API of the index is documented here. See GraphIndexTraits for information about how to override the index type for a graph.

Definition at line 121 of file Graph.h.

#include <Graph.h>

Public Member Functions

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

Member Function Documentation

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

Erase all data from this index.

This resets the index to the same state as if it were default constructed.

Definition at line 126 of file Graph.h.

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

Insert a new element into the map.

Inserts a mapping from a vertex or edge key to a vertex or edge const iterator regardless of whether the key already exists in the map. The index should never contain duplicate keys, so if the same key is inserted twice the second one overrides the first one. In other words, inserting a key/iterator pair into an index behaves exactly the same whether the index is implemented as an std::map from key to value or an array indexed by a key.

Definition at line 134 of file Graph.h.

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

Erase an element from the map.

Erases the mapping for the specified key. If the key does not exist in the index then nothing happens.

Definition at line 139 of file Graph.h.

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

Look up iterator for vertex or edge key.

Given a vertex or edge key, return the graph vertex or edge const iterator for that key. If the key does not exist in the index then return nothing.

Definition at line 145 of file Graph.h.


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