Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/graph/doc/AdjacencyMatrix.html @ 14

Last change on this file since 14 was 12, checked in by landauf, 17 years ago

added boost

File size: 2.7 KB
Line 
1<HTML>
2<!--
3  -- Copyright (c) Jeremy Siek 2000
4  --
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.
12  -->
13<Head>
14<Title>AdjacencyMatrix</Title>
15<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" 
16        ALINK="#ff0000"> 
17<IMG SRC="../../../boost.png" 
18     ALT="C++ Boost" width="277" height="86"> 
19
20<BR Clear>
21
22
23
24<H2><A NAME="concept:AdjacencyMatrix"></A>
25AdjacencyMatrix
26</H2>
27
28<P>
29The AdjacencyMatrix concept refines <a href="./Graph.html">Graph</a>
30concept and adds the requirement for efficient access to any edge in
31the graph given the source and target vertices. No Boost Graph Library
32algorithms currently use this concept. However there are algorithms
33not yet implemented such as Floyd-Warshall that would require this
34concept.
35
36<H3>Refinement of</H3>
37
38<a href="./Graph.html">Graph</a>
39
40<H3>Associated Types</H3>
41
42<Table border>
43
44<tr>
45<td><tt>boost::graph_traits&lt;G&gt;::traversal_category</tt><br><br>
46 This tag type must be convertible to <tt>adjacency_matrix_tag</tt>.
47</td>
48</tr>
49
50</table>
51
52<H3>Valid Expressions</H3>
53
54<table border>
55
56<tr>
57<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
58</tr>
59
60<tr>
61<td>Direct Edge Access</td>
62<TD><TT>edge(u,v,g)</TT></TD>
63<TD><TT>std::pair&lt;edge_descriptor, bool&gt;</TT></TD>
64<TD>
65Returns a pair consisting of a flag saying whether there exists an
66edge between <TT>u</TT> and <TT>v</TT> in graph <TT>g</TT>, and
67consisting of the edge descriptor if the edge was found.
68</TD>
69</TR>
70</TABLE>
71
72<H3>Complexity guarantees</H3>
73
74The <TT>edge()</TT> function must return in constant time.
75
76
77<H3>Models</H3>
78
79<a href="./adjacency_matrix.html"><tt>adjacency_matrix</tt></a>
80
81<H3>Concept Checking Class</H3>
82
83<PRE>
84  template &lt;class G&gt;
85  struct AdjacencyMatrix
86  {
87    typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
88    void constraints() {
89      p = edge(u, v, g);
90    }
91    typename boost::graph_traits&lt;G&gt;::vertex_descriptor u, v;
92    std::pair&lt;bool, edge_descriptor&gt; p;
93    G g;
94  };
95</PRE>
96
97
98<br>
99<HR>
100<TABLE>
101<TR valign=top>
102<TD nowrap>Copyright &copy 2000-2001</TD><TD>
103<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
104</TD></TR></TABLE>
105
106</BODY>
107</HTML> 
Note: See TracBrowser for help on using the repository browser.