mirror of
https://github.com/boostorg/graph.git
synced 2026-02-26 04:42:16 +00:00
Merged r76050, r75547, r75891, r76049, r76083, and r76439 from trunk (reverse_graph bug fixes and fix for #6293); refs #6293
[SVN r76535]
This commit is contained in:
@@ -116,7 +116,7 @@ Called for the target of every out edge of a vertex being examined.
|
||||
struct AStarHeuristicConcept {
|
||||
void constraints()
|
||||
{
|
||||
function_requires< CopyConstructibleConcept<Heuristic> >();
|
||||
BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Heuristic> ));
|
||||
h(u);
|
||||
}
|
||||
Heuristic h;
|
||||
|
||||
@@ -112,8 +112,8 @@ The <TT>adjacent_vertices()</TT> function must return in constant time.
|
||||
typedef typename boost::graph_traits<G>::adjacency_iterator
|
||||
adjacency_iterator;
|
||||
void constraints() {
|
||||
function_requires< IncidenceGraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<adjacency_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<adjacency_iterator> ));
|
||||
|
||||
p = adjacent_vertices(v, g);
|
||||
v = *p.first;
|
||||
|
||||
@@ -145,8 +145,8 @@ undirected graphs).
|
||||
typedef typename boost::graph_traits<G>::in_edge_iterator
|
||||
in_edge_iterator;
|
||||
void constraints() {
|
||||
function_requires< IncidenceGraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<in_edge_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<in_edge_iterator> ));
|
||||
|
||||
p = in_edges(v, g);
|
||||
e = *p.first;
|
||||
|
||||
@@ -146,8 +146,8 @@ must all return in constant time.
|
||||
typedef typename boost::graph_traits<G>::edge_iterator
|
||||
edge_iterator;
|
||||
void constraints() {
|
||||
function_requires< GraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<edge_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( GraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<edge_iterator> ));
|
||||
|
||||
p = edges(g);
|
||||
E = num_edges(g);
|
||||
|
||||
@@ -121,12 +121,12 @@ any vertex of graph object which type is <tt>G</tt>.
|
||||
typedef typename boost::graph_traits<G>::traversal_category traversal_category;
|
||||
|
||||
void constraints() {
|
||||
function_requires< DefaultConstructibleConcept<vertex_descriptor> >();
|
||||
function_requires< EqualityComparableConcept<vertex_descriptor> >();
|
||||
function_requires< AssignableConcept<vertex_descriptor> >();
|
||||
function_requires< DefaultConstructibleConcept<edge_descriptor> >();
|
||||
function_requires< EqualityComparableConcept<edge_descriptor> >();
|
||||
function_requires< AssignableConcept<edge_descriptor> >();
|
||||
BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept<vertex_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( EqualityComparableConcept<vertex_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( AssignableConcept<vertex_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept<edge_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( EqualityComparableConcept<edge_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( AssignableConcept<edge_descriptor> ));
|
||||
}
|
||||
G g;
|
||||
};
|
||||
|
||||
@@ -162,8 +162,8 @@ Therefore, the extra requirement is added that the out-edge connecting
|
||||
{
|
||||
typedef typename boost::graph_traits<G>::out_edge_iterator out_edge_iterator;
|
||||
void constraints() {
|
||||
function_requires< GraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<out_edge_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( GraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<out_edge_iterator> ));
|
||||
|
||||
p = out_edges(u, g);
|
||||
e = *p.first;
|
||||
|
||||
@@ -63,8 +63,8 @@ in addition to the members that are required of types that model <a href="./Upda
|
||||
typedef typename Q::key_map key_map;
|
||||
|
||||
void constraints() {
|
||||
function_requires< UpdatableQueue<Q> >();
|
||||
function_requires< ReadWritePropertyMap< key_map, typename Buffer<Q>::value_type > >();
|
||||
BOOST_CONCEPT_ASSERT(( UpdatableQueue<Q> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMap< key_map, typename Buffer<Q>::value_type > ));
|
||||
}
|
||||
|
||||
void const_constraints(const Q& cq) {
|
||||
|
||||
@@ -250,7 +250,7 @@ is no longer a valid vertex descriptor.
|
||||
struct MutableIncidenceGraphConcept
|
||||
{
|
||||
void constraints() {
|
||||
function_requires< MutableGraph<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( MutableGraph<G> ));
|
||||
remove_edge(iter, g);
|
||||
remove_out_edge_if(u, p, g);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ is no longer a valid vertex descriptor.
|
||||
struct MutableBidirectionalGraphConcept
|
||||
{
|
||||
void constraints() {
|
||||
function_requires< MutableIncidenceGraph<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( MutableIncidenceGraph<G> ));
|
||||
remove_in_edge_if(u, p, g);
|
||||
}
|
||||
G g;
|
||||
@@ -278,7 +278,7 @@ is no longer a valid vertex descriptor.
|
||||
struct MutableEdgeListGraphConcept
|
||||
{
|
||||
void constraints() {
|
||||
function_requires< MutableGraph<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( MutableGraph<G> ));
|
||||
remove_edge_if(p, g);
|
||||
}
|
||||
G g;
|
||||
|
||||
@@ -125,7 +125,7 @@ Return type: <TT>vertex_descriptor</TT>
|
||||
{
|
||||
typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor;
|
||||
void constraints() {
|
||||
function_requires< MutableGraphConcept<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( MutableGraphConcept<G> ));
|
||||
v = add_vertex(vp, g);
|
||||
p = add_edge(u, v, ep, g);
|
||||
}
|
||||
|
||||
@@ -173,9 +173,9 @@ The <tt>get()</tt> property map function must be constant time.
|
||||
typedef typename property_map<G, PropertyTag>::type Map;
|
||||
typedef typename property_map<G, PropertyTag>::const_type const_Map;
|
||||
void constraints() {
|
||||
function_requires< GraphConcept<G> >();
|
||||
function_requires< ReadWritePropertyMapConcept<Map, X> >();
|
||||
function_requires< ReadablePropertyMapConcept<const_Map, X> >();
|
||||
BOOST_CONCEPT_ASSERT(( GraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<Map, X> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<const_Map, X> ));
|
||||
|
||||
Map pmap = get(PropertyTag(), g);
|
||||
pval = get(PropertyTag(), g, x);
|
||||
|
||||
@@ -58,7 +58,7 @@ in addition to the members that are required of types that model <a href="./Buff
|
||||
struct UpdatableQueueConcept
|
||||
{
|
||||
void constraints() {
|
||||
function_requires< Buffer<Q> >();
|
||||
BOOST_CONCEPT_ASSERT(( Buffer<Q> ));
|
||||
|
||||
q.update(g_ct);
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ requirements are added.
|
||||
struct VertexAndEdgeListGraphConcept
|
||||
{
|
||||
void constraints() {
|
||||
function_requires< VertexListGraphConcept<G> >();
|
||||
function_requires< EdgeListGraphConcept<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<G> ));
|
||||
}
|
||||
};
|
||||
</PRE>
|
||||
|
||||
@@ -121,9 +121,9 @@ groups these requirements together, hence the VertexListGraph concept.
|
||||
typedef typename boost::graph_traits<G>::vertex_iterator
|
||||
vertex_iterator;
|
||||
void constraints() {
|
||||
function_requires< IncidenceGraphConcept<G> >();
|
||||
function_requires< AdjacencyGraphConcept<G> >();
|
||||
function_requires< MultiPassInputIteratorConcept<vertex_iterator> >();
|
||||
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<vertex_iterator> ));
|
||||
|
||||
p = vertices(g);
|
||||
V = num_vertices(g);
|
||||
|
||||
@@ -156,11 +156,11 @@ template.
|
||||
|
||||
@d Concept checking of type parameters
|
||||
@{
|
||||
function_requires< VertexListGraphConcept<Graph> >();
|
||||
function_requires< IncidenceGraphConcept<Graph> >();
|
||||
function_requires< WritablePropertyMapConcept<ComponentMap, edge_t> >();
|
||||
function_requires< ReadWritePropertyMapConcept<DiscoverTimeMap, vertex_t> >();
|
||||
function_requires< ReadWritePropertyMapConcept<LowPointMap, vertex_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
|
||||
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> ));
|
||||
BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<ComponentMap, edge_t> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<DiscoverTimeMap, vertex_t> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<LowPointMap, vertex_t> ));
|
||||
@}
|
||||
|
||||
The first step of the algorithm is to initialize the discover times of
|
||||
@@ -286,6 +286,7 @@ S.pop();
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/graph/graph_concepts.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
#include <boost/concept/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
@<Biconnected Components Algorithm@>
|
||||
|
||||
@@ -79,7 +79,7 @@ those types that model <a
|
||||
href="./VertexListGraph.html">VertexListGraph</a>. This is enforced by
|
||||
the use of those graph operations in the algorithm, and furthermore by
|
||||
our explicit requirement added as a concept check with
|
||||
<TT>function_requires()</TT> (see Section <A
|
||||
<TT>BOOST_CONCEPT_ASSERT()</TT> (see Section <A
|
||||
HREF="../../concept_check/concept_check.htm">Concept
|
||||
Checking</A> for more details about concept checking).
|
||||
|
||||
@@ -122,10 +122,10 @@ namespace boost {
|
||||
typedef typename property_traits<Color>::value_type ColorType;
|
||||
typedef typename property_traits<Order>::value_type OrderType;
|
||||
|
||||
function_requires< VertexListGraphConcept<VertexListGraph> >();
|
||||
function_requires< ReadWritePropertyMapConcept<Color, vertex_descriptor> >();
|
||||
function_requires< IntegerConcept<ColorType> >();
|
||||
function_requires< ReadablePropertyMapConcept<Order, size_type> >();
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<VertexListGraph> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<Color, vertex_descriptor> ));
|
||||
BOOST_CONCEPT_ASSERT(( IntegerConcept<ColorType> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<Order, size_type> ));
|
||||
BOOST_STATIC_ASSERT((is_same<OrderType, vertex_descriptor>::value));
|
||||
|
||||
size_type max_color = 0;
|
||||
|
||||
@@ -388,31 +388,31 @@ unsigned integers.
|
||||
@d Concept checking
|
||||
@{
|
||||
// Graph requirements
|
||||
function_requires< VertexListGraphConcept<Graph1> >();
|
||||
function_requires< EdgeListGraphConcept<Graph1> >();
|
||||
function_requires< VertexListGraphConcept<Graph2> >();
|
||||
function_requires< BidirectionalGraphConcept<Graph2> >();
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> ));
|
||||
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> ));
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> ));
|
||||
BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> ));
|
||||
|
||||
typedef typename graph_traits<Graph1>::vertex_descriptor vertex1_t;
|
||||
typedef typename graph_traits<Graph2>::vertex_descriptor vertex2_t;
|
||||
typedef typename graph_traits<Graph1>::vertices_size_type size_type;
|
||||
|
||||
// Vertex invariant requirement
|
||||
function_requires< AdaptableUnaryFunctionConcept<Invariant1,
|
||||
size_type, vertex1_t> >();
|
||||
function_requires< AdaptableUnaryFunctionConcept<Invariant2,
|
||||
size_type, vertex2_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant1,
|
||||
size_type, vertex1_t> ));
|
||||
BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant2,
|
||||
size_type, vertex2_t> ));
|
||||
|
||||
// Property map requirements
|
||||
function_requires< ReadWritePropertyMapConcept<IsoMapping, vertex1_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IsoMapping, vertex1_t> ));
|
||||
typedef typename property_traits<IsoMapping>::value_type IsoMappingValue;
|
||||
BOOST_STATIC_ASSERT((is_same<IsoMappingValue, vertex2_t>::value));
|
||||
|
||||
function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> ));
|
||||
typedef typename property_traits<IndexMap1>::value_type IndexMap1Value;
|
||||
BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value));
|
||||
|
||||
function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> ));
|
||||
typedef typename property_traits<IndexMap2>::value_type IndexMap2Value;
|
||||
BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value));
|
||||
@}
|
||||
|
||||
@@ -507,31 +507,31 @@ unsigned integers.
|
||||
@d Concept checking
|
||||
@{
|
||||
// Graph requirements
|
||||
function_requires< VertexListGraphConcept<Graph1> >();
|
||||
function_requires< EdgeListGraphConcept<Graph1> >();
|
||||
function_requires< VertexListGraphConcept<Graph2> >();
|
||||
function_requires< BidirectionalGraphConcept<Graph2> >();
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> ));
|
||||
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> ));
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> ));
|
||||
BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> ));
|
||||
|
||||
typedef typename graph_traits<Graph1>::vertex_descriptor vertex1_t;
|
||||
typedef typename graph_traits<Graph2>::vertex_descriptor vertex2_t;
|
||||
typedef typename graph_traits<Graph1>::vertices_size_type size_type;
|
||||
|
||||
// Vertex invariant requirement
|
||||
function_requires< AdaptableUnaryFunctionConcept<Invariant1,
|
||||
size_type, vertex1_t> >();
|
||||
function_requires< AdaptableUnaryFunctionConcept<Invariant2,
|
||||
size_type, vertex2_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant1,
|
||||
size_type, vertex1_t> ));
|
||||
BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant2,
|
||||
size_type, vertex2_t> ));
|
||||
|
||||
// Property map requirements
|
||||
function_requires< ReadWritePropertyMapConcept<IsoMapping, vertex1_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IsoMapping, vertex1_t> ));
|
||||
typedef typename property_traits<IsoMapping>::value_type IsoMappingValue;
|
||||
BOOST_STATIC_ASSERT((is_same<IsoMappingValue, vertex2_t>::value));
|
||||
|
||||
function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> ));
|
||||
typedef typename property_traits<IndexMap1>::value_type IndexMap1Value;
|
||||
BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value));
|
||||
|
||||
function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> ));
|
||||
typedef typename property_traits<IndexMap2>::value_type IndexMap2Value;
|
||||
BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value));
|
||||
@}
|
||||
|
||||
@@ -301,21 +301,21 @@ unsigned integers.
|
||||
@d Concept checking
|
||||
@{
|
||||
// Graph requirements
|
||||
function_requires< VertexListGraphConcept<Graph1> >();
|
||||
function_requires< EdgeListGraphConcept<Graph1> >();
|
||||
function_requires< VertexListGraphConcept<Graph2> >();
|
||||
function_requires< BidirectionalGraphConcept<Graph2> >();
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> ));
|
||||
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> ));
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> ));
|
||||
BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> ));
|
||||
|
||||
// Property map requirements
|
||||
function_requires< ReadWritePropertyMapConcept<IndexMapping, vertex1_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IndexMapping, vertex1_t> ));
|
||||
typedef typename property_traits<IndexMapping>::value_type IndexMappingValue;
|
||||
BOOST_STATIC_ASSERT((is_same<IndexMappingValue, vertex2_t>::value));
|
||||
|
||||
function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> ));
|
||||
typedef typename property_traits<IndexMap1>::value_type IndexMap1Value;
|
||||
BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value));
|
||||
|
||||
function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> ));
|
||||
typedef typename property_traits<IndexMap2>::value_type IndexMap2Value;
|
||||
BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value));
|
||||
@}
|
||||
|
||||
@@ -236,9 +236,9 @@ href="../test/graph.cpp"><TT>test/graph.cpp</TT></a>.
|
||||
main(int,char*[])
|
||||
{
|
||||
typedef GRAPH<int,int> Graph;
|
||||
function_requires< VertexListGraphConcept<Graph> >();
|
||||
function_requires< BidirectionalGraphConcept<Graph> >();
|
||||
function_requires< MutableGraphConcept<Graph> >();
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
|
||||
BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> ));
|
||||
BOOST_CONCEPT_ASSERT(( MutableGraphConcept<Graph> ));
|
||||
return 0;
|
||||
}
|
||||
</PRE>
|
||||
|
||||
@@ -27,7 +27,7 @@ The <tt>reverse_graph</tt> adaptor flips the in-edges and out-edges of
|
||||
a <a href="./BidirectionalGraph.html">BidirectionalGraph</a>,
|
||||
effectively transposing the graph. The construction of the
|
||||
<tt>reverse_graph</tt> is constant time, providing a highly efficient
|
||||
way to obtain a transposed-view of a graph.
|
||||
way to obtain a transposed view of a graph.
|
||||
|
||||
|
||||
<H3>Example</H3>
|
||||
@@ -215,6 +215,16 @@ and must match one of the properties specified in the
|
||||
<hr>
|
||||
|
||||
|
||||
<tt>property_map<reverse_graph, edge_underlying_t>::type</tt><br>
|
||||
and<br>
|
||||
<tt>property_map<reverse_graph, edge_underlying_t>::const_type</tt>
|
||||
<br><br>
|
||||
An edge property type mapping from edge descriptors in the <tt>reverse_graph</tt> to
|
||||
edge descriptors in the underlying <tt>BidirectionalGraph</tt> object.
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<H2>Member Functions</H2>
|
||||
|
||||
<hr>
|
||||
@@ -358,6 +368,16 @@ argument.
|
||||
|
||||
<hr>
|
||||
|
||||
<pre>
|
||||
property_map<reverse_graph, edge_underlying_t>::const_type
|
||||
get(PropertyTag, const reverse_graph& g)
|
||||
</pre>
|
||||
Returns a property map object that converts from edge descriptors in the
|
||||
<tt>reverse_graph</tt> to edge descriptors in the underlying
|
||||
<tt>BidirectionalGraph</tt> object.
|
||||
|
||||
<hr>
|
||||
|
||||
<pre>
|
||||
template <class <a href="./PropertyTag.html">PropertyTag</a>, class X>
|
||||
typename property_traits<property_map<reverse_graph, PropertyTag>::const_type>::value_type
|
||||
@@ -367,6 +387,13 @@ This returns the property value for <tt>x</tt>, which is either
|
||||
a vertex or edge descriptor.
|
||||
<hr>
|
||||
|
||||
<pre>
|
||||
typename graph_traits<BidirectionalGraph>::edge_descriptor
|
||||
get(edge_underlying_t, const reverse_graph& g, edge_descriptor e)
|
||||
</pre>
|
||||
This returns the underlying edge descriptor for the edge <tt>e</tt> in the <tt>reverse_graph</tt>.
|
||||
<hr>
|
||||
|
||||
<pre>
|
||||
template <class <a href="./PropertyTag.html">PropertyTag</a>, class X, class Value>
|
||||
void
|
||||
|
||||
@@ -160,11 +160,11 @@ algorithm.
|
||||
|
||||
@d Concept checking
|
||||
@{
|
||||
function_requires< VertexListGraphConcept<Graph> >();
|
||||
function_requires< AdjacencyGraphConcept<Graph> >();
|
||||
function_requires< VertexMutableGraphConcept<GraphTC> >();
|
||||
function_requires< EdgeMutableGraphConcept<GraphTC> >();
|
||||
function_requires< ReadablePropertyMapConcept<VertexIndexMap, vertex> >();
|
||||
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
|
||||
BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> ));
|
||||
BOOST_CONCEPT_ASSERT(( VertexMutableGraphConcept<GraphTC> ));
|
||||
BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept<GraphTC> ));
|
||||
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<VertexIndexMap, vertex> ));
|
||||
@}
|
||||
|
||||
\noindent To simplify the code in the rest of the function we make the
|
||||
@@ -566,8 +566,8 @@ void warshall_transitive_closure(G& g)
|
||||
typedef typename graph_traits<G>::vertex_descriptor vertex;
|
||||
typedef typename graph_traits<G>::vertex_iterator vertex_iterator;
|
||||
|
||||
function_requires< AdjacencyMatrixConcept<G> >();
|
||||
function_requires< EdgeMutableGraphConcept<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept<G> ));
|
||||
|
||||
// Matrix form:
|
||||
// for k
|
||||
@@ -597,8 +597,8 @@ void warren_transitive_closure(G& g)
|
||||
typedef typename graph_traits<G>::vertex_descriptor vertex;
|
||||
typedef typename graph_traits<G>::vertex_iterator vertex_iterator;
|
||||
|
||||
function_requires< AdjacencyMatrixConcept<G> >();
|
||||
function_requires< EdgeMutableGraphConcept<G> >();
|
||||
BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept<G> ));
|
||||
|
||||
// Make sure second loop will work
|
||||
if (num_vertices(g) == 0)
|
||||
@@ -671,6 +671,7 @@ indent -nut -npcs -i2 -br -cdw -ce transitive_closure.hpp
|
||||
#include <boost/graph/topological_sort.hpp>
|
||||
#include <boost/graph/graph_concepts.hpp>
|
||||
#include <boost/graph/named_function_params.hpp>
|
||||
#include <boost/concept/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user