Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49210 - in sandbox/SOC/2008/graphs/trunk: boost boost/graphs boost/graphs/adjacency_list libs/graphs/test
From: asutton_at_[hidden]
Date: 2008-10-09 11:09:19


Author: asutton
Date: 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
New Revision: 49210
URL: http://svn.boost.org/trac/boost/changeset/49210

Log:
Finished migrating the undirected adjacency list implementatoin into the
corrent namespace.

Text files modified:
   sandbox/SOC/2008/graphs/trunk/boost/containers.hpp | 16 ++++----
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_list.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_set.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_vector.hpp | 10 +++--
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_iterator.hpp | 7 ++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_list.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_set.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_vector.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/property_list.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/property_vector.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_edge.hpp | 68 +++++++++++++++++++++------------------
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_graph.hpp | 21 +++++++-----
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_types.hpp | 8 ++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_vertex.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_iterator.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_list.hpp | 7 ++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_map.hpp | 7 ++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_set.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_vector.hpp | 8 +++-
   sandbox/SOC/2008/graphs/trunk/boost/graphs/utility.hpp | 7 ++-
   sandbox/SOC/2008/graphs/trunk/libs/graphs/test/Jamfile | 4 +
   sandbox/SOC/2008/graphs/trunk/libs/graphs/test/basic_matrix.cpp | 13 +++++--
   sandbox/SOC/2008/graphs/trunk/libs/graphs/test/desc.cpp | 1
   sandbox/SOC/2008/graphs/trunk/libs/graphs/test/incidence_traits.hpp | 12 +++---
   sandbox/SOC/2008/graphs/trunk/libs/graphs/test/un.cpp | 1
   25 files changed, 174 insertions(+), 96 deletions(-)

Modified: sandbox/SOC/2008/graphs/trunk/boost/containers.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/containers.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/containers.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -217,45 +217,45 @@
 
 // Generic insert/remove functions
 
-namespace dispatch
+namespace detail
 {
     // Insert implementations
     template <typename Container, typename T>
     inline typename Container::iterator
- insert(Container& c, T const& x, sequence_tag)
+ dispatch_insert(Container& c, T const& x, sequence_tag)
     { return c.insert(c.end(), x); }
 
     template <typename Container, typename T>
     inline typename Container::iterator
- insert(Container& c, T const& x, unique_associative_container_tag)
+ dispatch_insert(Container& c, T const& x, unique_associative_container_tag)
     { return c.insert(x).first; }
 
     template <typename Container, typename T>
     inline typename Container::iterator
- insert(Container& c, T const& x, multiple_associative_container_tag)
+ dispatch_insert(Container& c, T const& x, multiple_associative_container_tag)
     { return c.insert(x); }
 
     // Find (non-const) implementations
     template <typename Container, typename T>
     inline typename Container::iterator
- find(Container& c, T const& x, sequence_tag)
+ dispatch_find(Container& c, T const& x, sequence_tag)
     { return std::find(c.begin(), c.end(), x); }
 
     template <typename Container, typename T>
     inline typename Container::iterator
- find(Container& c, T const& x, associative_container_tag)
+ dispatch_find(Container& c, T const& x, associative_container_tag)
     { return c.find(x); }
 }
 
 template <typename Container, typename T>
 inline typename Container::iterator
 insert(Container& c, T const& x)
-{ return dispatch::insert(c, x, container_category(c)); }
+{ return detail::dispatch_insert(c, x, container_category(c)); }
 
 template <typename Container, typename T>
 inline typename Container::iterator
 find(Container& c, T const& x)
-{ return dispatch::find(c, x, container_category(c)); }
+{ return detail::dispatch_find(c, x, container_category(c)); }
 
 template <typename Container>
 void

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_list.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_list.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_list.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,11 +1,13 @@
 
-#ifndef EDGE_LIST_HPP
-#define EDGE_LIST_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_EDGE_LIST_HPP
+#define BOOST_GRAPHS_ADJLIST_EDGE_LIST_HPP
 
 #include <list>
 
 #include <boost/descriptors.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 // Forward declarations
 template <typename, typename> class property_list;
 template <typename, typename> class incidence_list;
@@ -83,4 +85,6 @@
     };
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_set.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_set.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_set.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,6 @@
 
-#ifndef EDGE_SET_HPP
-#define EDGE_SET_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_EDGE_SET_HPP
+#define BOOST_GRAPHS_ADJLIST_EDGE_SET_HPP
 
 #include <list>
 #include <map>
@@ -8,6 +8,8 @@
 #include <boost/triple.hpp>
 #include <boost/descriptors.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 // Forward declarations
 template <typename, typename> class property_list;
 template <typename, typename, typename> class incidence_set;
@@ -94,5 +96,7 @@
     };
 };
 
+} } }
+
 #endif
 

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_vector.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_vector.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/edge_vector.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,10 +1,12 @@
 
-#ifndef EDGE_VECTOR_HPP
-#define EDGE_VECTOR_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_EDGE_VECTOR_HPP
+#define BOOST_GRAPHS_ADJLIST_EDGE_VECTOR_HPP
 
 #include <boost/triple.hpp>
 #include <boost/descriptors.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 // Forward declarations
 template <typename, typename> class property_vector;
 template <typename, typename> class incidence_vector;
@@ -70,8 +72,6 @@
         typedef incidence_vector<incidence_pair, incidence_allocator> type;
     };
 
-
-
     // Descriptor types for directed graphs.
     typedef typename descriptor_traits<first_dummy>::descriptor_type out_descriptor;
     typedef typename descriptor_traits<second_dummy>::descriptor_type in_descriptor;
@@ -98,4 +98,6 @@
     };
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_iterator.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_iterator.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_iterator.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,8 @@
 
-#ifndef INCIDENCE_ITERATOR_HPP
-#define INCIDENCE_ITERATOR_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_INCIDENCE_ITERATOR_HPP
+#define BOOST_GRAPHS_ADJLIST_INCIDENCE_ITERATOR_HPP
+
+namespace boost { namespace graphs { namespace adjacency_list {
 
 /**
  * The incidence iterator is an abstraction over the incidence iterators of
@@ -81,5 +83,6 @@
     iterator iter;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
 
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_list.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_list.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_list.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,12 +1,14 @@
 
-#ifndef INCIDENCE_LIST_HPP
-#define INCIDENCE_LIST_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_INCIDENCE_LIST_HPP
+#define BOOST_GRAPHS_ADJLIST_INCIDENCE_LIST_HPP
 
 #include <list>
 #include <algorithm>
 
 #include <boost/graphs/utility.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 /**
  * The incidence vector stores incident "edges" of a vertex. In actuality,
  * this stores pairs containing an adjacent vertex descriptor and a property
@@ -111,4 +113,6 @@
     size_type _size;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_set.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_set.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_set.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,11 +1,13 @@
 
-#ifndef INCIDENCE_SET_HPP
-#define INCICENCE_SET_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_INCIDENCE_SET_HPP
+#define BOOST_GRAPHS_ADJLIST_INCIDENCE_SET_HPP
 
 #include <map>
 
 #include <boost/descriptors.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 /**
  * The incidence vector stores incident "edges" of a vertex. In actuality,
  * this stores pairs containing an adjacent vertex descriptor and a property
@@ -111,4 +113,6 @@
     mutable store_type _edges;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_vector.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_vector.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/incidence_vector.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,6 @@
 
-#ifndef INCIDENCE_VECTOR
-#define INCIDENCE_VECTOR
+#ifndef BOOST_GRAPHS_ADJLIST_INCIDENCE_VECTOR_HPP
+#define BOOST_GRAPHS_ADJLIST_INCIDENCE_VECTOR_HPP
 
 #include <vector>
 #include <algorithm>
@@ -8,6 +8,8 @@
 #include <boost/descriptors.hpp>
 #include <boost/graphs/utility.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 /**
  * The incidence vector stores incident "edges" of a vertex. In actuality,
  * this stores pairs containing an adjacent vertex descriptor and a property
@@ -91,4 +93,6 @@
     mutable store_type _edges;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/property_list.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/property_list.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/property_list.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,6 @@
 
-#ifndef PROPERTY_LIST_HPP
-#define PROPERTY_LIST_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_PROPERTY_LIST_HPP
+#define BOOST_GRAPHS_ADJLIST_PROPERTY_LIST_HPP
 
 #include <list>
 #include <algorithm>
@@ -8,6 +8,8 @@
 #include <boost/descriptors.hpp>
 #include <boost/graphs/utility.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 /**
  * The property list implements global list of label for node-based edge
  * storage. Note that we can get away with only a list because the edge
@@ -135,5 +137,7 @@
     size_type _size;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif
 

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/property_vector.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/property_vector.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/property_vector.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,6 @@
 
-#ifndef PROPERTY_VECTOR_HPP
-#define PROPERTY_VECTOR_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_PROPERTY_VECTOR_HPP
+#define BOOST_GRAPHS_ADJLIST_PROPERTY_VECTOR_HPP
 
 #include <vector>
 #include <algorithm>
@@ -8,6 +8,8 @@
 #include <boost/descriptors.hpp>
 #include <boost/graphs/utility.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 /**
  * The property vector implements a vector-based global property store for
  * vector-based edge storage. Assuming, of course, that there are actually edge
@@ -118,5 +120,7 @@
     mutable store_type _props;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif
 

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_edge.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_edge.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_edge.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,12 +1,14 @@
 
-#ifndef UNDIRECTED_EDGE_HPP
-#define UNDIRECTED_EDGE_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_UNDIRECTED_EDGE_HPP
+#define BOOST_GRAPHS_ADJLIST_UNDIRECTED_EDGE_HPP
 
 #include <iosfwd>
 
 #include <boost/unordered_pair.hpp>
 #include <boost/graphs/directional_edge.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 /**
  * This structure implements an unordered edge - sort of. Because the undirected
  * adjacency list class doesn't ever store a concrete edge type, this edge
@@ -127,35 +129,6 @@
     return hash_value(e.label());
 }
 
-namespace detail
-{
- // Provide an implementation of directionality for undirected edges.
- template <typename Vert, typename Prop>
- struct directional_edge_adapter<undirected_edge<Vert,Prop>>
- : undirected_edge<Vert,Prop>
- {
- inline directional_edge_adapter()
- : undirected_edge<Vert, Prop>(), src()
- { }
-
- inline directional_edge_adapter(undirected_edge<Vert,Prop> e, Vert s)
- : undirected_edge<Vert,Prop>(e), src(s)
- { }
-
- inline directional_edge_adapter(Vert s, Vert t)
- : undirected_edge<Vert,Prop>(s, t), src(s)
- { }
-
- inline Vert source() const
- { return src; }
-
- inline Vert target() const
- { return this->opposite(src); }
-
- Vert src;
- };
-}
-
 /**
  * The undirected edge iterator simply wraps the iterator over the global edge
  * property store of undirected graphs.
@@ -226,4 +199,37 @@
     iterator iter;
 };
 
+} /* namespace adjacency_list */
+
+namespace detail
+{
+ // Provide an implementation of directionality for undirected edges.
+ template <typename Vert, typename Prop>
+ struct directional_edge_adapter<adjacency_list::undirected_edge<Vert,Prop>>
+ : adjacency_list::undirected_edge<Vert,Prop>
+ {
+ inline directional_edge_adapter()
+ : adjacency_list::undirected_edge<Vert, Prop>(), src()
+ { }
+
+ inline directional_edge_adapter(adjacency_list::undirected_edge<Vert,Prop> e, Vert s)
+ : adjacency_list::undirected_edge<Vert,Prop>(e), src(s)
+ { }
+
+ inline directional_edge_adapter(Vert s, Vert t)
+ : adjacency_list::undirected_edge<Vert,Prop>(s, t), src(s)
+ { }
+
+ inline Vert source() const
+ { return src; }
+
+ inline Vert target() const
+ { return this->opposite(src); }
+
+ Vert src;
+ };
+}
+
+} } /* namespace boost::graphs */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_graph.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_graph.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_graph.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,6 @@
 
-#ifndef UNDIRECTED_GRAPH_HPP
-#define UNDIRECTED_GRAPH_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_UNDIRECTED_GRAPH_HPP
+#define BOOST_GRAPHS_ADJLIST_UNDIRECTED_GRAPH_HPP
 
 #include <boost/assert.hpp>
 #include <boost/none.hpp>
@@ -8,11 +8,12 @@
 #include <boost/graphs/adjacency_list/undirected_types.hpp>
 #include <boost/graphs/adjacency_list/adjacency_iterator.hpp>
 
-template <
- typename VertexLabel,
- typename EdgeLabel,
- typename VertexStore,
- typename EdgeStore>
+namespace boost { namespace graphs { namespace adjacency_list {
+
+/**
+ *
+ */
+template <typename VertexLabel, typename EdgeLabel,typename VertexStore, typename EdgeStore>
 class undirected_graph
 {
     typedef undirected_types<VertexLabel, EdgeLabel, VertexStore, EdgeStore> types;
@@ -563,8 +564,8 @@
             // Grab descriptors to the property and the incident edge on the
             // target vertex and remove them,
             label_descriptor p = e.label();
- pair<incidence_descriptor, incidence_descriptor> x =
- make_pair(_props.first_edge(p), _props.second_edge(p));
+ std::pair<incidence_descriptor, incidence_descriptor> x =
+ std::make_pair(_props.first_edge(p), _props.second_edge(p));
             if(src.opposite(x.first) == v) {
                 x.first.swap(x.second);
             }
@@ -752,5 +753,7 @@
 
 #undef BOOST_GRAPH_UG_PARAMS
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif
 

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_types.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_types.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_types.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,6 @@
 
-#ifndef UNDIRECTED_TYPES_HPP
-#define UNDIRECTED_TYPES_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_UNDIRECTED_TYPES_HPP
+#define BOOST_GRAPHS_ADJLIST_UNDIRECTED_TYPES_HPP
 
 // Vertex stores
 #include <boost/graphs/adjacency_list/vertex_vector.hpp>
@@ -28,7 +28,7 @@
 // Adjacency components
 #include <boost/graphs/adjacency_list/adjacency_iterator.hpp>
 
-using namespace std;
+namespace boost { namespace graphs { namespace adjacency_list {
 
 /**
  * This class is a giant metafunction that generates the types required to
@@ -71,4 +71,6 @@
 
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_vertex.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_vertex.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/undirected_vertex.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,9 +1,11 @@
 
-#ifndef UNDIRECTED_VERTEX_HPP
-#define UNDIRECTED_VERTEX_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_UNDIRECTED_VERTEX_HPP
+#define BOOST_GRAPHS_ADJLIST_UNDIRECTED_VERTEX_HPP
 
 #include <boost/graphs/adjacency_list/incidence_iterator.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 /**
  * A vertex, at least for an undirected graph, is simply an repository for the
  * vertex's label and an interface for the its incidence list.
@@ -103,4 +105,6 @@
     incidence_store _edges;
 };
 
+} } } /* namesapce boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_iterator.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_iterator.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_iterator.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,9 +1,11 @@
 
-#ifndef VERTEX_ITERATOR_HPP
-#define VERTEX_ITERATOR_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_VERTEX_ITERATOR_HPP
+#define BOOST_GRAPHS_ADJLIST_VERTEX_ITERATOR_HPP
 
 #include <boost/descriptors.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 /**
  * A simple vertex iterator for any underlying store. These iterators must
  * cache references to the originating container because these dereference to
@@ -73,4 +75,6 @@
     iterator iter;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_list.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_list.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_list.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,6 @@
 
-#ifndef VERTEX_LIST_HPP
-#define VERTEX_LIST_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_VERTEX_LIST_HPP
+#define BOOST_GRAPHS_ADJLIST_VERTEX_LIST_HPP
 
 #include <list>
 
@@ -8,6 +8,8 @@
 #include <boost/descriptors.hpp>
 #include <boost/graphs/adjacency_list/vertex_iterator.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 // Forward declarations
 template <typename, typename> class vertices_list;
 
@@ -143,6 +145,7 @@
     size_type _size;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
 
 #endif
 

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_map.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_map.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_map.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,12 +1,14 @@
 
-#ifndef VERTEX_MAP_HPP
-#define VERTEX_MAP_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_VERTEX_MAP_HPP
+#define BOOST_GRAPHS_ADJLIST_VERTEX_MAP_HPP
 
 #include <map>
 
 #include <boost/descriptors.hpp>
 #include <boost/graphs/adjacency_list/vertex_iterator.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 // Forward declarations
 template <typename, typename, typename, typename> class vertices_map;
 
@@ -150,5 +152,6 @@
     mutable store_type _verts;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
 
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_set.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_set.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_set.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,6 @@
 
-#ifndef VERTEX_SET_HPP
-#define VERTEX_SET_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_VERTEX_SET_HPP
+#define BOOST_GRAPHS_ADJLIST_VERTEX_SET_HPP
 
 #include <set>
 
@@ -9,6 +9,8 @@
 #include <boost/graphs/utility.hpp>
 #include <boost/graphs/adjacency_list/vertex_iterator.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 // Forward declarations
 template <typename, typename, typename> class vertices_set;
 
@@ -146,4 +148,6 @@
     mutable store_type _verts;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_vector.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_vector.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/adjacency_list/vertex_vector.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,6 +1,6 @@
 
-#ifndef VERTEX_VECTOR_HPP
-#define VERTEX_VECTOR_HPP
+#ifndef BOOST_GRAPHS_ADJLIST_VERTEX_VECTOR_HPP
+#define BOOST_GRAPHS_ADJLIST_VERTEX_VECTOR_HPP
 
 #include <vector>
 #include <algorithm>
@@ -10,6 +10,8 @@
 #include <boost/graphs/utility.hpp>
 #include <boost/graphs/adjacency_list/vertex_iterator.hpp>
 
+namespace boost { namespace graphs { namespace adjacency_list {
+
 // Forward declarations
 template <typename, typename> struct vertices_vector;
 
@@ -145,4 +147,6 @@
     mutable store_type _verts;
 };
 
+} } } /* namespace boost::graphs::adjacency_list */
+
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/boost/graphs/utility.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/boost/graphs/utility.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/boost/graphs/utility.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,9 +1,11 @@
 
-#ifndef UTILITY_HPP
-#define UTILITY_HPP
+#ifndef BOOST_GRAPHS_UTILITY_HPP
+#define BOOST_GRAPHS_UTILITY_HPP
 
 #include <boost/descriptors.hpp>
 
+namespace boost { namespace graphs {
+
 /**
  * @internal
  * The insertion result structure encapsulates information about the results
@@ -162,5 +164,6 @@
 find_first(First const& props)
 { return first_finder<First>(props); }
 
+} } /* namespace boost::graphs */
 
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/libs/graphs/test/Jamfile
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/libs/graphs/test/Jamfile (original)
+++ sandbox/SOC/2008/graphs/trunk/libs/graphs/test/Jamfile 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -17,7 +17,9 @@
 # exe props : props.cpp : <include>../../ <include>/usr/local/include ;
 # exe edge : edge.cpp : <include>../../ <include>/usr/local/include ;
 
-exe desc : desc.cpp : <include>../../ <include>/usr/local/include ;
+exe opt : opt.cpp ;
+exe unordered_pair : unordered_pair.cpp ;
+exe desc : desc.cpp ;
 
 exe test_verts : test_verts.cpp ;
 exe test_props : test_props.cpp ;

Modified: sandbox/SOC/2008/graphs/trunk/libs/graphs/test/basic_matrix.cpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/libs/graphs/test/basic_matrix.cpp (original)
+++ sandbox/SOC/2008/graphs/trunk/libs/graphs/test/basic_matrix.cpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -1,10 +1,10 @@
 
 #include <iostream>
 
-#include "typestr.hpp"
-
 #include <boost/graphs/adjacency_matrix/basic_matrix.hpp>
 
+#include "typestr.hpp"
+
 using namespace std;
 using namespace boost;
 using namespace boost::graphs::adjacency_matrix;
@@ -21,6 +21,11 @@
     b(1, 1) = 3.14;
     cout << "(1, 1) -> " << (b.test(1, 1) ? "on" : "off") << endl;
     cout << "(2, 2) -> " << (b.test(2, 2) ? "on" : "off") << endl;
- optional<double>& d = b(1, 1);
- cout << d.get() << endl;
+ cout << endl;
+
+ typedef basic_matrix<optional_value<int>> C;
+ C c(10);
+ c(1, 1) = 12;
+ cout << "(1, 1) -> " << (c.test(1, 1) ? "on" : "off") << endl;
+ cout << "(2, 2) -> " << (c.test(2, 2) ? "on" : "off") << endl;
 }

Modified: sandbox/SOC/2008/graphs/trunk/libs/graphs/test/desc.cpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/libs/graphs/test/desc.cpp (original)
+++ sandbox/SOC/2008/graphs/trunk/libs/graphs/test/desc.cpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -10,6 +10,7 @@
 #include "typestr.hpp"
 
 using namespace std;
+using namespace boost;
 
 struct my_kind { };
 

Modified: sandbox/SOC/2008/graphs/trunk/libs/graphs/test/incidence_traits.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/libs/graphs/test/incidence_traits.hpp (original)
+++ sandbox/SOC/2008/graphs/trunk/libs/graphs/test/incidence_traits.hpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -2,9 +2,9 @@
 #ifndef INCIDENCE_TRAITS_HPP
 #define INCIDENCE_TRAITS_HPP
 
-struct incidence_vector_tag : virtual vector_tag, virtual unstable_remove_tag { };
-struct incidence_list_tag : virtual list_tag, virtual stable_mutators_tag { };
-struct incidence_set_tag : virtual unique_associative_container_tag, virtual stable_mutators_tag { };
+struct incidence_vector_tag : virtual boost::vector_tag, virtual boost::unstable_remove_tag { };
+struct incidence_list_tag : virtual boost::list_tag, virtual boost::stable_mutators_tag { };
+struct incidence_set_tag : virtual boost::unique_associative_container_tag, virtual boost::stable_mutators_tag { };
 
 template <typename IncStore>
 struct incidence_traits
@@ -16,15 +16,15 @@
 { return typename incidence_traits<IncStore>::category(); }
 
 template <typename Edge, typename Alloc>
-struct incidence_traits<incidence_vector<Edge, Alloc>>
+struct incidence_traits<boost::graphs::adjacency_list::incidence_vector<Edge, Alloc>>
 { typedef incidence_vector_tag category; };
 
 template <typename Edge, typename Alloc>
-struct incidence_traits<incidence_list<Edge, Alloc>>
+struct incidence_traits<boost::graphs::adjacency_list::incidence_list<Edge, Alloc>>
 { typedef incidence_list_tag category; };
 
 template <typename Edge, typename Comp, typename Alloc>
-struct incidence_traits<incidence_set<Edge, Comp, Alloc>>
+struct incidence_traits<boost::graphs::adjacency_list::incidence_set<Edge, Comp, Alloc>>
 { typedef incidence_set_tag category; };
 
 #endif

Modified: sandbox/SOC/2008/graphs/trunk/libs/graphs/test/un.cpp
==============================================================================
--- sandbox/SOC/2008/graphs/trunk/libs/graphs/test/un.cpp (original)
+++ sandbox/SOC/2008/graphs/trunk/libs/graphs/test/un.cpp 2008-10-09 11:09:17 EDT (Thu, 09 Oct 2008)
@@ -10,6 +10,7 @@
 
 using namespace std;
 using namespace boost;
+using namespace boost::graphs::adjacency_list;
 
 typedef int City;
 typedef int Road;


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