3 -- Copyright (c) Jeremy Siek 2000
5 -- Permission to use, copy, modify, distribute and sell this software
6 -- and its documentation for any purpose is hereby granted without fee,
7 -- provided that the above copyright notice appears in all copies and
8 -- that both that copyright notice and this permission notice appear
9 -- in supporting documentation. Silicon Graphics makes no
10 -- representations about the suitability of this software for any
11 -- purpose. It is provided "as is" without express or implied warranty.
14 <Title>EdgeListGraph
</Title>
15 <BODY BGCOLOR=
"#ffffff" LINK=
"#0000ee" TEXT=
"#000000" VLINK=
"#551a8b"
17 <IMG SRC=
"../../../c++boost.gif"
18 ALT=
"C++ Boost" width=
"277" height=
"86">
23 <H2><A NAME=
"concept:EdgeListGraph"></A>
27 The EdgeListGraph concept refines the
<a href=
"./Graph.html">Graph
</a>
28 concept, and adds the requirement for efficient access to all the
32 <H3>Refinement of
</H3>
34 <a href=
"./Graph.html">Graph
</a>
42 <TD>A type that is a model of EdgeListGraph.
</TD>
47 <TD>An object of type
<tt>G
</tt>.
</TD>
52 <TD>An object of type
<tt>boost::graph_traits
<G
>::edge_descriptor
</tt>.
</TD>
57 <H3>Associated Types
</H3>
62 <td><pre>boost::graph_traits
<G
>::edge_iterator
</pre>
63 An edge iterator (obtained via
<TT>edges(g)
</TT>) provides access to
64 all of the edges in a graph. An edge iterator type must meet the
66 href=
"../../utility/MultiPassInputIterator.html">MultiPassInputIterator
</a>. The
67 value type of the edge iterator must be the same as the edge
68 descriptor of the graph.
71 <td><pre>boost::graph_traits
<G
>::edges_size_type
</pre>
72 The unsigned integer type used to represent the number of edges in the
79 <h3>Valid Expressions
</h3>
84 <TD><a name=
"sec:edges"><TT>edges(g)
</TT></a></TD>
85 <TD>Returns an iterator-range providing access to all
86 the edges in the graph
<TT>g
</TT>.
<br>
87 Return type:
<TT>std::pair
<edge_iterator, edge_iterator
></TT>
92 <TD><TT>num_edges(g)
</TT></TD>
93 <TD>Returns the number of edges in the graph
<TT>g
</TT>.
<br>
94 Return type:
<TT>edges_size_type
</TT>
99 <TD><TT>source(e, g)
</TT></TD>
101 Returns the vertex descriptor for
<i>u
</i> of the edge
<i>(u,v)
</i>
102 represented by
<TT>e
</TT>.
<br>
103 Return type:
<TT>vertex_descriptor
</TT>
108 <TD><TT>target(e, g)
</TT></TD>
110 Returns the vertex descriptor for
111 <i>v
</i> of the edge
<i>(u,v)
</i> represented by
<TT>e
</TT>.
<br>
112 Return type:
<TT>vertex_descriptor
</TT>
122 <LI><a href=
"./adjacency_list.html"><TT>adjacency_list
</TT></a></LI>
123 <LI><a href=
"./edge_list.html"><TT>edge_list
</TT></a></LI>
127 <H3>Complexity guarantees
</H3>
129 The
<TT>edges()
</TT>,
<TT>source()
</TT>, and
<TT>target()
</TT> functions
130 must all return in constant time.
135 <a href=
"./graph_concepts.html">Graph concepts
</a>
137 <H3>Concept Checking Class
</H3>
141 template
<class G
>
142 struct EdgeListGraph_concept
144 typedef typename boost::graph_traits
<G
>::edge_iterator
148 REQUIRE(edge_iterator, MultiPassInputIterator);
155 const_constraints(g);
157 void const_constraints(const G
& g) {
164 std::pair
<edge_iterator,edge_iterator
> p;
165 typename boost::graph_traits
<G
>::vertex_descriptor u, v;
166 typename boost::graph_traits
<G
>::edge_descriptor e;
167 typename boost::graph_traits
<G
>::edges_size_type E;
177 <TD nowrap
>Copyright ©
2000</TD><TD>
178 <A HREF=http://www.boost.org/people/jeremy_siek.htm
>Jeremy Siek
</A>, Univ.of Notre Dame (
<A HREF=
"mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu
</A>)