ROSE 0.11.145.192
|
Vertex node.
These list nodes contain all information about a vertex and are the objects returned (by reference) when a vertex node iterator (VertexIterator or ConstVertexIterator) is dereferenced.
#include <Sawyer/Graph.h>
Public Member Functions | |
const size_t & | id () const |
Unique vertex ID number. | |
size_t | nInEdges () const |
Number of incoming edges. | |
size_t | nOutEdges () const |
Number of outgoing edges. | |
size_t | degree () const |
Number of incident edges. | |
boost::iterator_range< EdgeIterator > | inEdges () |
List of incoming edges. | |
boost::iterator_range< ConstEdgeIterator > | inEdges () const |
List of incoming edges. | |
boost::iterator_range< EdgeIterator > | outEdges () |
List of outgoing edges. | |
boost::iterator_range< ConstEdgeIterator > | outEdges () const |
List of outgoing edges. | |
VertexValue & | value () |
User-defined value. | |
const VertexValue & | value () const |
User-defined value. | |
|
inline |
Unique vertex ID number.
Vertices within a graph are numbered consecutively starting at zero, and this method returns the vertex's ID number. ID numbers are unrelated to the order in which vertices are inserted, although in the absense of vertex erasure they will be assigned consecutively. Vertex ID numbers are stable over insertion of vertices and edges and the erasure of edges, but are not stable over vertex erasure. In order to obtain constant-time vertex erasure (at least when it has no incident edges), after a vertex is erased the largest-ID vertex is renumbered to fill the gap.
Time complexity is constant.
Definition at line 1225 of file Graph.h.
Referenced by Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::clearInEdges(), Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::clearOutEdges(), Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::eraseVertex(), Sawyer::Container::Algorithm::graphCopySubgraph(), Sawyer::Container::Algorithm::graphDependentOrder(), Sawyer::Container::Algorithm::graphFindConnectedComponents(), Sawyer::Container::Algorithm::graphIsConnected(), Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::insertEdge(), Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::insertEdgeMaybe(), Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::isValidVertex(), and Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::operator=().
|
inline |
List of incoming edges.
Returns a sublist of edges whose target vertex is this vertex. The return value is a pair of iterators which delineate the edges. The traversal is in no particular order. Edge iterators are equality-comparable with one another even when the come from different sublists. See EdgeIterator for details.
Time complexity is constant.
Definition at line 1236 of file Graph.h.
Referenced by Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::clearInEdges(), Sawyer::Container::Algorithm::graphFindConnectedComponents(), and Sawyer::Container::Algorithm::graphIsConnected().
|
inline |
List of incoming edges.
Returns a sublist of edges whose target vertex is this vertex. The return value is a pair of iterators which delineate the edges. The traversal is in no particular order. Edge iterators are equality-comparable with one another even when the come from different sublists. See EdgeIterator for details.
Time complexity is constant.
|
inline |
List of outgoing edges.
Returns a sublist of edges whose source vertex is this vertex. The return value is a pair of iterators which delineate the edges. The traversal is in no particular order. Edge iterators are equality-comparable with one another even when the come from different sublists. See EdgeIterator for details.
Time complexity is constant.
Definition at line 1257 of file Graph.h.
Referenced by Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::clearOutEdges(), Sawyer::Container::Algorithm::graphCopySubgraph(), Sawyer::Container::Algorithm::graphDependentOrder(), Sawyer::Container::Algorithm::graphEraseParallelEdges(), Sawyer::Container::Algorithm::graphFindConnectedComponents(), and Sawyer::Container::Algorithm::graphIsConnected().
|
inline |
List of outgoing edges.
Returns a sublist of edges whose source vertex is this vertex. The return value is a pair of iterators which delineate the edges. The traversal is in no particular order. Edge iterators are equality-comparable with one another even when the come from different sublists. See EdgeIterator for details.
Time complexity is constant.
|
inline |
|
inline |
Number of outgoing edges.
Returns the out-degree of this vertex, the length of the list returned by outEdges.
Definition at line 1279 of file Graph.h.
Referenced by Sawyer::Container::Algorithm::graphEraseParallelEdges().
|
inline |
|
inline |
User-defined value.
Each vertex stores one user-defined value whose type is specified as the V
parameter of the Graph template (a.k.a., the VertexValue type). This method returns a reference to that data, which was copied into the graph when this vertex was inserted. This is also the value that is returned when a vertex value iterator (VertexValueIterator or ConstVertexValueIterator) is dereferenced.
Time complexity is constant.
Definition at line 1301 of file Graph.h.
Referenced by Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::eraseVertex(), Sawyer::Container::Algorithm::graphCopySubgraph(), and Sawyer::Container::Graph< V, E, VKey, EKey, Alloc >::operator=().
|
inline |
User-defined value.
Each vertex stores one user-defined value whose type is specified as the V
parameter of the Graph template (a.k.a., the VertexValue type). This method returns a reference to that data, which was copied into the graph when this vertex was inserted. This is also the value that is returned when a vertex value iterator (VertexValueIterator or ConstVertexValueIterator) is dereferenced.
Time complexity is constant.