mirror of
https://github.com/boostorg/graph.git
synced 2026-01-21 04:52:18 +00:00
103 lines
3.2 KiB
HTML
103 lines
3.2 KiB
HTML
<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</Title>
|
|
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
|
ALINK="#ff0000">
|
|
<IMG SRC="../../../c++boost.gif"
|
|
ALT="C++ Boost" width="277" height="86">
|
|
|
|
<BR Clear>
|
|
|
|
<H1><A NAME="sec:property"></A>
|
|
<TT>property<PropertyTag, T, NextProperty></TT>
|
|
</H1>
|
|
|
|
This class can be used with the <a
|
|
href="./adjacency_list.html"><tt>adjacency_list</tt></a> and the <a
|
|
href="./adjacency_matrix.html"><tt>adjacency_matrix</tt></a> classes
|
|
to specify what kind of properties should be attached to the vertices
|
|
and edges of the graph, and to the graph object itself.
|
|
|
|
<h3>Template Parameters</h3>
|
|
|
|
|
|
<P>
|
|
<TABLE border>
|
|
<TR>
|
|
<th>Parameter</th><th>Description</th><th>Default</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><tt>PropertyTag</tt></td>
|
|
|
|
<td>A type to identify (give a unique name to) the property. There are
|
|
several predefined tags, and it is easy to add more. For convenience,
|
|
BGL also provides predefined objects of the tag types (enum values)
|
|
for use as arguments to functions that expect property tag objects
|
|
(such as <tt>adjacency_list</tt>'s <a
|
|
href="./adjacency_list.html#property-map-accessors"> property map
|
|
accessor</a> functions). </td>
|
|
|
|
<td> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><tt>T</tt></td>
|
|
<td> This type specifies the type of the property values. </td>
|
|
<td> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><tt>NextProperty</tt></td>
|
|
<td>This parameter allows <tt>property</tt> types to be
|
|
nested, so that an arbitrary number of properties can be attached to
|
|
the same graph.</td>
|
|
<td><tt>no_property</tt></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h3>Where Defined</h3>
|
|
|
|
<a href="../../../boost/pending/property.hpp"><tt>boost/pending/property.hpp</tt></a>
|
|
|
|
<h3>Property Tags</h3>
|
|
|
|
The following property tags are defined in
|
|
<tt>boost/graph/properties.hpp</tt>.
|
|
|
|
<pre>
|
|
namespace boost {
|
|
enum edge_name_t { edge_name };
|
|
enum edge_weight_t { edge_weight };
|
|
enum edge_index_t { edge_index };
|
|
enum edge_capacity_t { edge_capacity };
|
|
enum edge_residual_capacity_t { edge_residual_capacity };
|
|
enum edge_reverse_t { edge_reverse };
|
|
enum vertex_name_t { vertex_name };
|
|
enum vertex_distance_t { vertex_distance };
|
|
enum vertex_index_t { vertex_index };
|
|
enum vertex_color_t { vertex_color };
|
|
enum vertex_degree_t { vertex_degree };
|
|
enum vertex_out_degree_t { vertex_out_degree };
|
|
enum vertex_in_degree_t { vertex_in_degree };
|
|
enum vertex_discover_time_t { vertex_discover_time };
|
|
enum vertex_finish_time_t { vertex_finish_time };
|
|
enum graph_name_t { graph_name };
|
|
|
|
BOOST_INSTALL_PROPERTY(vertex, index);
|
|
BOOST_INSTALL_PROPERTY(edge, index);
|
|
// ...
|
|
}
|
|
</pre>
|