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

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

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004