DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
The C++ Graph Classes: A Tutorial - Graph(C++) and Graph_alg(C++)

Edge Information Retrieval

The following Edge member functions are defined for both the generic and user-derived Edge types:

       Vertex* src() const; // source Vertex
       Vertex* dst() const; // destination Vertex
       const Set_of_p<Graph>& graphs() const;
           // Graphs which include this Edge
       int in_graph(const Graph& g) const;
           // Is this Edge in g?

The Edge source and destination are determined by the ordering of arguments to the Edge constructor: source, then destination. Note that in an undirected Graph application, the order of Vertices is not significant: to retrieve a pointer to the Vertex at ``one end'' of the Edge, use either src() or dst(): use of the other will retrieve a pointer to the Vertex at the ``other end.''


Next topic: Edge Traversal Support
Previous topic: Edge Operators

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005