Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56089 - in trunk: boost/graph libs/graph/doc libs/graph/example
From: jewillco_at_[hidden]
Date: 2009-09-07 10:55:38


Author: jewillco
Date: 2009-09-07 10:55:38 EDT (Mon, 07 Sep 2009)
New Revision: 56089
URL: http://svn.boost.org/trac/boost/changeset/56089

Log:
Applied fixes for bugs; fixes #3409, #3414, #3415, #3416
Text files modified:
   trunk/boost/graph/compressed_sparse_row_graph.hpp | 2 +-
   trunk/libs/graph/doc/IncidenceGraph.html | 4 ++--
   trunk/libs/graph/doc/quick_tour.html | 3 +--
   trunk/libs/graph/example/quick_tour.cpp | 19 ++++++++++---------
   4 files changed, 14 insertions(+), 14 deletions(-)

Modified: trunk/boost/graph/compressed_sparse_row_graph.hpp
==============================================================================
--- trunk/boost/graph/compressed_sparse_row_graph.hpp (original)
+++ trunk/boost/graph/compressed_sparse_row_graph.hpp 2009-09-07 10:55:38 EDT (Mon, 07 Sep 2009)
@@ -1482,7 +1482,7 @@
   { return m_edge == other.m_edge; }
 
   void increment() { ++m_edge.idx; }
- void decrement() { ++m_edge.idx; }
+ void decrement() { --m_edge.idx; }
   void advance(difference_type n) { m_edge.idx += n; }
 
   difference_type distance_to(const out_edge_iterator& other) const

Modified: trunk/libs/graph/doc/IncidenceGraph.html
==============================================================================
--- trunk/libs/graph/doc/IncidenceGraph.html (original)
+++ trunk/libs/graph/doc/IncidenceGraph.html 2009-09-07 10:55:38 EDT (Mon, 07 Sep 2009)
@@ -76,7 +76,7 @@
 
 <TR>
 <TD><pre>boost::graph_traits&lt;G&gt;::degree_size_type</pre>
-The unsigned intergral type used for representing the number
+The unsigned integral type used for representing the number
 out-edges or incident edges of a vertex.
 </TD>
 </TR>
@@ -108,7 +108,7 @@
 <TT>u</TT> in graph <TT>g</TT>. The source vertex of an edge obtained
 via an out edge iterator is guaranteed (for both directed and
 undirected graphs) to be the vertex <tt>u</tt> used in the call to
-<tt>out_edges(u, g)</tt> and the target vertex must the a vertex
+<tt>out_edges(u, g)</tt> and the target vertex must be a vertex
 adjacent to <tt>u</tt>.[1]
 <br>
 Return type: <TT>std::pair&lt;out_edge_iterator, out_edge_iterator&gt;</TT>

Modified: trunk/libs/graph/doc/quick_tour.html
==============================================================================
--- trunk/libs/graph/doc/quick_tour.html (original)
+++ trunk/libs/graph/doc/quick_tour.html 2009-09-07 10:55:38 EDT (Mon, 07 Sep 2009)
@@ -210,8 +210,7 @@
 </pre>
 The output is:
 <pre>
- edges(g) = (0,1) (0,2) (0,3) (0,4) (2,0) (2,4) (3,0)
- (3,1) (3,4) (4,0) (4,1)
+ edges(g) = (0,1) (0,3) (2,0) (3,2) (2,4) (1,3) (3,4)
 </pre>
 <p>&nbsp;
 <h2>The Adjacency Structure</h2>

Modified: trunk/libs/graph/example/quick_tour.cpp
==============================================================================
--- trunk/libs/graph/example/quick_tour.cpp (original)
+++ trunk/libs/graph/example/quick_tour.cpp 2009-09-07 10:55:38 EDT (Mon, 07 Sep 2009)
@@ -18,14 +18,14 @@
 using namespace boost;
 
 template <class Graph> struct exercise_vertex {
- exercise_vertex(Graph& g_) : g(g_) { }
+ exercise_vertex(Graph& g_, const char name_[]) : g(g_),name(name_) { }
   typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
   void operator()(const Vertex& v) const
   {
     using namespace boost;
     typename property_map<Graph, vertex_index_t>::type
       vertex_id = get(vertex_index, g);
- std::cout << "vertex: " << get(vertex_id, v) << std::endl;
+ std::cout << "vertex: " << name[get(vertex_id, v)] << std::endl;
 
     // Write out the outgoing edges
     std::cout << "\tout-edges: ";
@@ -36,8 +36,8 @@
     {
       e = *out_i;
       Vertex src = source(e, g), targ = target(e, g);
- std::cout << "(" << get(vertex_id, src)
- << "," << get(vertex_id, targ) << ") ";
+ std::cout << "(" << name[get(vertex_id, src)]
+ << "," << name[get(vertex_id, targ)] << ") ";
     }
     std::cout << std::endl;
 
@@ -48,8 +48,8 @@
     {
       e = *in_i;
       Vertex src = source(e, g), targ = target(e, g);
- std::cout << "(" << get(vertex_id, src)
- << "," << get(vertex_id, targ) << ") ";
+ std::cout << "(" << name[get(vertex_id, src)]
+ << "," << name[get(vertex_id, targ)] << ") ";
     }
     std::cout << std::endl;
 
@@ -57,10 +57,11 @@
     std::cout << "\tadjacent vertices: ";
     typename graph_traits<Graph>::adjacency_iterator ai, ai_end;
     for (tie(ai,ai_end) = adjacent_vertices(v, g); ai != ai_end; ++ai)
- std::cout << get(vertex_id, *ai) << " ";
+ std::cout << name[get(vertex_id, *ai)] << " ";
     std::cout << std::endl;
   }
   Graph& g;
+ const char *name;
 };
 
 
@@ -73,7 +74,7 @@
   // Make convenient labels for the vertices
   enum { A, B, C, D, E, N };
   const int num_vertices = N;
- const char* name = "ABCDE";
+ const char name[] = "ABCDE";
 
   // writing out the edges in the graph
   typedef std::pair<int,int> Edge;
@@ -120,7 +121,7 @@
   std::cout << std::endl;
 
   std::for_each(vertices(g).first, vertices(g).second,
- exercise_vertex<Graph>(g));
+ exercise_vertex<Graph>(g, name));
 
   std::map<std::string,std::string> graph_attr, vertex_attr, edge_attr;
   graph_attr["size"] = "3,3";


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk