2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-31 08:12:14 +00:00

added documentation for some traits classes

[SVN r7773]
This commit is contained in:
Jeremy Siek
2000-09-22 18:53:58 +00:00
parent d0b354f81b
commit be3712aa86
7 changed files with 295 additions and 31 deletions

View File

@@ -23,7 +23,7 @@
Property
</H2>
A Property type is a type used to name or identity properties that are
A Property type is a type used to name or identify properties that are
attached to the vertices and edges of a graph. A Property type is not
the type of the actual property values. Objects of the Property type
are not used except to carry the type information which specifies the
@@ -35,7 +35,7 @@ property.
<tr>
<td>Property Kind </td>
<td><TT>Property::kind</TT> </td>
<td><TT>kind</TT> </td>
<td>
This specifies whether the property is a vertex property
(<tt>vertex_property_tag</tt>), an edge property
@@ -48,6 +48,11 @@ href="../../../boost/graph/properties.hpp"><tt>boost/graph/properties.hpp</tt></
</table>
<h3>Refinement of</h3>
<a
href="http://www.sgi.com/Technology/STL/DefaultConstructible.html">DefaultConstructible</a>
<h3>Models</h3>

View File

@@ -58,9 +58,15 @@ function which returns a property map object.
<TD>An object of type <tt>X</tt>.</TD>
</TR>
<TR>
<TD><tt>PMap</tt></TD>
<TD>The type <tt>boost::property_map&lt;G, Property&gt;::const_type</tt>.</TD>
</TR>
<TR>
<TD><tt>v</tt></TD>
<TD>An object of type <tt>property_traits&lt;property_map&lt;G, Property&gt;::type&gt;::value_type</tt>.</TD>
<TD>An object of type <tt>boost::property_traits&lt;PMap&gt;::value_type</tt>.</TD>
</TR>
<TR>
@@ -73,6 +79,11 @@ function which returns a property map object.
<TD>An object of type <tt>Property</tt>.</td>
</TR>
<TR>
<TD><tt>pmap</tt></TD>
<TD>An object of type <tt>PMap</tt>.</td>
</TR>
</table>
<H3>Associated types</H3>
@@ -125,26 +136,31 @@ carry the type.
<tr>
<td>Get Property</td>
<td> <TT>get(p, g, x)</TT> </td>
<TD><TT>boost::property_traits&lt;boost::property_map&lt;G, Property&gt;::type&gt;::value_type</TT></TD>
<TD><tt>
boost::property_traits&lt;PMap&gt;::value_type
</tt></TD>
<td>
Returns the property (specified by the <tt>Property</tt> type)
associated with object <tt>x</tt> (a vertex or edge).
The object <tt>p</tt> is only used to carry the type.
This function is equivalent to:<br>
<tt>get(get(property, g), x)</tt>
<tt>get(get(p, g), x)</tt>
</td>
</TR>
<tr>
<td>Put Property</td>
<td> <TT>put(property, g, x, v)</TT> </td>
<td> <TT>put(p, g, x, v)</TT> </td>
<TD><TT>void</TT></TD>
<td>
Set the property (specified by the <tt>Property</tt> type)
associated with object <tt>x</tt> (a vertex or edge) to
the value <tt>v</tt>. The object <tt>p</tt> is only used to carry the type.
This function is equivalent to:<br>
<tt>put(get(property, g), x, v)</tt>
<tt>
pmap = get(p, g);<br>
put(pmap, x, v)
</tt>
</td>
</TR>
@@ -195,6 +211,11 @@ The <tt>get()</tt> property map function must be constant time.
};
</PRE>
<h3>See Also</h3>
<a href="./property_map.html"><tt>property_map</tt></a>
<br>
<HR>
<TABLE>

View File

@@ -219,29 +219,6 @@ exterior property storage.
<P>
<h2><tt>adjacency_list_traits&lt;EdgeList, VertexList, Directed&gt;</tt>
This class provides an alternate method for accessing some of the
associated types of the <tt>adjacency_list</tt> class. The main reason
for this class is that sometimes one would like to create graph
properties whose values are vertex or edge descriptors. If you try to
use <tt>graph_traits</tt> for this you will run into a problem with
mutually recursive types. To get around this problem, the
<tt>adjacency_list_traits</tt> class is provided, which gives the user
access to the descriptor types without requiring the user to provide
the plugin types for the graph.
<pre>
template <class EdgeList, class VertexList, class Directed>
struct adjacency_list_traits {
typedef ... directed_category;
typedef ... edge_parallel_category;
typedef ... vertex_descriptor;
typedef ... edge_descriptor;
};
</pre>
<H2>Associated Types</H2>
<table border>
@@ -645,6 +622,9 @@ argument.
</table>
<h3>See Also</h3>
<a href="./adjacency_list_traits.html"><tt>adjacency_list_traits</tt></a>
<br>
<HR>

View File

@@ -0,0 +1,162 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Graph Traits</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost">
<BR Clear>
<H1><A NAME=""></A>
<pre>
adjacency_list_traits&lt;EdgeList, VertexList, Directed&gt;
</pre>
</H1>
This class provides an alternate method for accessing some of the
associated types of the <tt>adjacency_list</tt> class. The main reason
for this class is that sometimes one would like to create graph
properties whose values are vertex or edge descriptors. If you try to
use <tt>graph_traits</tt> for this you will run into a problem with
mutually recursive types. To get around this problem, the
<tt>adjacency_list_traits</tt> class is provided, which gives the user
access to the vertex and edge descriptor types without requiring the
user to provide the plugin types for the graph.
<pre>
template &lt;class EdgeList, class VertexList, class Directed&gt;
struct adjacency_list_traits {
typedef ... vertex_descriptor;
typedef ... edge_descriptor;
typedef ... directed_category;
typedef ... edge_parallel_category;
};
</pre>
<h3>Where Defined</h3>
<a href="../../../boost/graph/adjacency_list.hpp"><tt>boost/graph/adjacency_list.hpp</tt></a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>EdgeList</TT></TD>
<TD>
The selector type for the edge container implementation.
</TD>
<td><tt>vecS</tt></td>
</TR>
<TR><TD><TT>VertexList</TT></TD>
<TD>
The selector type for the vertex container implementation.
</TD>
<td><tt>vecS</tt></td>
</TR>
<TR><TD><TT>Directed</TT></TD>
<TD>
The selector type whether the graph is directed or undirected.
</TD>
<td><tt>directedS</tt></td>
</TR>
</table>
<h3>Model of</h3>
<a
href="http://www.sgi.com/Technology/STL/DefaultConstructible.html">DefaultConstructible</a> and
<a href="http://www.sgi.com/Technology/STL/Assignable.html">Assignable</a>
<h3>Type Requirements</h3>
Under construction.
<H2>Members</H2>
<p>
<table border>
<tr>
<th>Member</th><th>Description</th>
</tr>
<tr>
<td><tt>
vertex_descriptor
</tt></td>
<td>
The type for the objects used to identity vertices in the graph.
</td>
</tr>
<tr>
<td><tt>
edge_descriptor
</tt></td>
<td>
The type for the objects used to identity edges in the graph.
</td>
</tr>
<tr>
<td><tt>
directed_category
</tt></td>
<td>
This says whether the graph is undirected (<tt>undirected_tag</tt>)
or directed (<tt>directed_tag</tt>).
</td>
</tr>
<tr>
<td><tt>
edge_parallel_category
</tt></td>
<td>
This says whether the graph allows parallel edges to be inserted
(<tt>allow_parallel_edge_tag</tt>) or if it automatically removes
parallel edges (<tt>disallow_parallel_edge_tag</tt>).
</td>
</tr>
</table>
<h3>See Also</h3>
<a href="./adjacency_list.html"><tt>adjacency_list</tt></a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<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>)<br>
<A HREF=http://www.lsc.nd.edu/~llee1>Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -21,7 +21,7 @@
<H1><A NAME=""></A>
<pre>
graph_traits&lt;Graph&gt;
graph_traits&lt;<a href="./Graph.html">Graph</a>&gt;
</pre>
</H1>

90
docs/property_map.html Normal file
View File

@@ -0,0 +1,90 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Property Map Traits</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost">
<BR Clear>
<BR Clear>
<H1><A NAME=""></A>
<pre>
property_map&lt;<a href="./PropertyGraph.html">PropertyGraph</a>, <a href="./Property.html">Property</a>&gt;
</pre>
</H1>
This is the traits class that produces the type for a <a
href="../../property_map/property_map.html">property map</a> object
for a particular graph type. The property is specified by the <a
href="./Property.html">Property</a> template parameter. Graph classes
must specialize this traits class to provide their own implementation
for property maps.
<pre>
template &lt;class Graph, class Property&gt;
struct property_map {
typedef ... type;
typedef ... const_type;
};
</pre>
<h3>Where Defined</h3>
<a href="../../../boost/graph/properties.hpp"><tt>boost/graph/properties.hpp</tt></a>
<h3>Associated Types</h3>
<table border>
<tr>
<td>Map Type</td>
<td><TT>type</TT> </td>
<td>
The (mutable) property map type for mapping vertex or edge desriptors of
the graph to their associated property values, where the property is
specified by <tt>Property</tt>. This type is a <a
href="../../property_map/property_map.html">property map</a>.
</tr>
<tr>
<td>Const Map Type</td>
<td><TT>const_type</TT> </td>
<td>
The (non-mutable) property map type for mapping vertex or edge
desriptors of the graph to their associated property values, where the
property is specified by <tt>Property</tt>. This type is a <a
href="../../property_map/property_map.html">property map</a>.
</tr>
</table>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<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>)<br>
<A HREF=http://www.lsc.nd.edu/~llee1>Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -94,6 +94,12 @@
<LI><A href="../../../boost/graph/leda_graph.hpp">Leda Graph </A><a href="#*">*</a>
<LI><A href="../../../boost/graph/stanford_graph.hpp">Stanford Graph</A><a href="#*">*</a>
</OL>
<LI>Traits classes
<OL>
<LI><a href="./graph_traits.html"><tt>graph_traits</tt></a>
<LI><a href="./adjacency_list_traits.html"><tt>adjacency_list_traits</tt></a>
<LI><a href="./property_map.html"><tt>property_map</tt></a>
</OL>
<LI>Algorithms
<OL>
<LI>Core Algorithm Patterns