Boost logo

Boost-Commit :

From: asutton_at_[hidden]
Date: 2008-06-02 20:17:22


Author: asutton
Date: 2008-06-02 20:17:21 EDT (Mon, 02 Jun 2008)
New Revision: 46068
URL: http://svn.boost.org/trac/boost/changeset/46068

Log:
Work on retagging impl.

Added:
   sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/is/
      - copied from r46066, /sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/ves/
Removed:
   sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/ves/
Text files modified:
   sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/adjacency_list.hpp | 375 +--------------------------------------
   sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/descriptor.hpp | 12
   sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/directed/directed.hpp | 45 ----
   sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/es/edge_vector.hpp | 17 +
   sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/undirected/undirected.hpp | 61 ------
   sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/undirected/vertex.hpp | 16
   sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/vs/vertex_vector.hpp | 25 ++
   7 files changed, 71 insertions(+), 480 deletions(-)

Modified: sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/adjacency_list.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/adjacency_list.hpp (original)
+++ sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/adjacency_list.hpp 2008-06-02 20:17:21 EDT (Mon, 02 Jun 2008)
@@ -21,390 +21,37 @@
 namespace adj_list {
 
 /**
- * The adjacency_list template is the basic implementation of an adjacency
- * list graph structure. The adjacency list stores sets of both vertices and
- * edges, with each vertex being associated with a set of incident edges.
- *
- * The adjacency list actually inherits most of its storage facilities from
- * the vertex and edge storage types. These classes expose public interfaces
- * for specific forms of vertex and edge management.
  */
 template <
- template <typename, typename, typename, typename, template <typename> class > class Type,
+ typename Direction = none,
     typename VertexProps = none,
     typename EdgeProps = none,
- template <typename> class VertexStore = vertex_vector,
- template <typename> class EdgeStore = edge_vector,
- template <typename> class VertexEdgeStore = vertex_edge_list,
- template <typename> class AllowEdgePolicy = allow_loops_policy
+ typename VertexStore = none,
+ typename EdgeStore = none,
+ typename IncidenceStore = none,
+ typename AllowableEdgePolicy = none
>
 class adjacency_list
- : public VertexStore<
- typename Type< // Instantiate the type over dummy stores
- VertexProps,
- EdgeProps,
- VertexStore<none>,
- EdgeStore<none>,
- VertexEdgeStore
- >::vertex_type
- >
- , public EdgeStore<
- typename Type< // Instantiate the type over dummy stores
- VertexProps,
- EdgeProps,
- VertexStore<none>,
- EdgeStore<none>,
- VertexEdgeStore
- >::edge_type
- >
 {
- typedef Type<
- VertexProps, EdgeProps, VertexStore<none>, EdgeStore<none>, VertexEdgeStore
- > graph_type;
-
 public:
- typedef adjacency_list<
- Type, VertexProps, EdgeProps, VertexStore, EdgeStore, VertexEdgeStore, AllowEdgePolicy
- > this_type;
-
- typedef VertexStore<typename graph_type::vertex_type> vertex_store;
- typedef EdgeStore<typename graph_type::edge_type> edge_store;
-
- typedef typename vertex_store::vertex_type vertex_type;
- typedef typename vertex_store::vertex_descriptor vertex_descriptor;
- typedef typename vertex_store::vertex_iterator vertex_iterator;
- typedef typename vertex_type::properties_type vertex_properties;
-
- typedef typename edge_store::edge_type edge_type;
- typedef typename edge_store::edge_descriptor edge_descriptor;
- typedef typename edge_store::edge_iterator edge_iterator;
- typedef typename edge_type::properties_type edge_properties;
-
- typedef typename vertex_type::incidence_iterator incidence_iterator;
- typedef typename vertex_type::incidence_range incidence_range;
- typedef basic_adjacency_iterator<this_type> adjacency_iterator;
- typedef std::pair<adjacency_iterator, adjacency_iterator> adjacency_range;
+ typedef typename VertexStore::descriptor_type vertex_descriptor;
+ typedef typename EdgeStore::descriptor_type edge_descriptor;
 
     adjacency_list();
-
- // Add edge
- // requires HasAdd<vertex_store>
- edge_descriptor add_edge(vertex_descriptor u, vertex_descriptor v);
- edge_descriptor add_edge(vertex_descriptor u, vertex_descriptor v, edge_properties const& ep);
-
-
- // Insert edge (do we need these functions? - descriptors are evaluable).
- // requires HasInsert<vertex_store>
- std::pair<edge_descriptor, bool> insert_edge(vertex_descriptor u, vertex_descriptor v);
- std::pair<edge_descriptor, bool> insert_edge(vertex_descriptor u, vertex_descriptor v, edge_properties const& ep);
-
- // Vertex disconnect
- // Requires HasRemove<edge_store> && ???
- void disconnect_vertex(vertex_descriptor v);
-
- // Vertex removal
- // requires HasRemove<vertex_store>
- void remove_vertex(vertex_descriptor v);
-
- // Edge removal
- // requires HasRemove<edge_store>
- void remove_edge(edge_descriptor e);
- void remove_edge(vertex_descriptor u, vertex_descriptor v);
-
-
- // Iterators. Lots and lots of iterators.
- incidence_range incident_edges(vertex_descriptor v) const;
- incidence_iterator begin_incident_edges(vertex_descriptor v) const;
- incidence_iterator end_incident_edges(vertex_descriptor v) const;
-
- adjacency_range adjacent_vertices(vertex_descriptor v) const;
- adjacency_iterator begin_adjacent_vertices(vertex_descriptor v) const;
- adjacency_iterator end_adjacent_vertices(vertex_descriptor v) const;
-
- // Descriptor accessor. Use these functions to get descriptors...
- vertex_descriptor descriptor(vertex_type const& v) const;
- edge_descriptor descriptor(edge_type const& e) const;
-
- // Edge and vertex accessors
- vertex_properties& properties(vertex_descriptor v);
- vertex_properties const& properties(vertex_descriptor v) const;
- edge_properties& properties(edge_descriptor e);
- edge_properties const& properties(edge_descriptor e) const;
-
 };
 
 // Functions
 
 #define BOOST_GRAPH_ADJLIST_PARAMS \
- template <typename, typename, typename, typename, template <typename> class> class T, \
- typename VP, \
- typename EP, \
- template <typename> class VS, \
- template <typename> class ES, \
- template <typename> class VES, \
- template <typename> class AEP
+ typename D, typename VP, typename EP, typename VS, typename ES, typename IS, typename AEP
 
 /**
- * Add a vertex to the graph with no or default properties.
+ * Construct an empty adjacency list.
  */
 template <BOOST_GRAPH_ADJLIST_PARAMS>
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::adjacency_list()
- : vertex_store()
- , edge_store()
+adjacency_list<D,VP,EP,VS,ES,OS,AEP>::adjacency_list()
 { }
 
-/**
- * Add a vertex to the graph with no or default properties.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::edge_descriptor
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::add_edge(
- vertex_descriptor u,
- vertex_descriptor v)
-{
- return add_edge(u, v, edge_properties());
-}
-
-/**
- * Add a vertex to the graph with the given properties. The edge will not be
- * added (no action taken) if the endpoints form a loop.
- *
- * @todo What if the user intentially passes null vertices? We should add a
- * loose or unconnected edge... but how does one actually manage these things?
- * For now, operate on the assumption that the vertices are valid.
- *
- * @todo Similar to above, how do we want to handle loops. It's currently built
- * as a simple boolean value that either allows the addition or not.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::edge_descriptor
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::add_edge(
- vertex_descriptor u,
- vertex_descriptor v,
- edge_properties const& ep)
-{
- typedef adjacency_list<T,VP,EP,VS,ES,VES,AEP> this_type;
-
- edge_descriptor e;
- if(AEP<this_type>::allow(u, v, ep)) {
- e = edge_store::add_edge(u, v, ep);
-
- this->vertex(u).connect_to(e);
- this->vertex(v).connect_from(e);
- }
-
- return e;
-}
-
-
-/**
- * Add an edge that connects the given properties.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-std::pair<typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::edge_descriptor, bool>
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::insert_edge(
- vertex_descriptor u,
- vertex_descriptor v)
-{
- return insert_edge(u, v, edge_properties());
-}
-
-/**
- * Connect the vertex u to v and set the corresponding edge properties to ep.
- * Return a pair containing an edge descriptor and a boolean value that
- * indicates whether or not the edge was added. Note that if the graph does
- * not allow self loops or loose edges, the edge descriptor will be null.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-std::pair<typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::edge_descriptor, bool>
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::insert_edge(
- vertex_descriptor u,
- vertex_descriptor v,
- edge_properties const& ep)
-{
- typedef adjacency_list<T,VP,EP,VS,ES,VES,AEP> this_type;
-
- std::pair<edge_descriptor, bool> ret(edge_descriptor(), false);
- if(AEP<this_type>::allow(u, v, ep)) {
- ret = edge_store::insert_edge(u, v, ep);
- if(ret.second) {
- this->vertex(u).connect_to(ret.first);
- this->vertex(v).connect_from(ret.first);
- }
- }
-}
-
-/**
- * Disconnect this vertex from all others (remove all incident edges). This
- * is typically a precursor operation for vertex removal to ensure that no
- * dangling edges are left.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-void
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::disconnect_vertex(vertex_descriptor v)
-{
- BOOST_ASSERT(v.is_valid());
-
- // Optimal implementation depends on the vertex structure.
- disconnect(*this, this->vertex(v), typename graph_type::tag());
-}
-
-/**
- * Remove the given vertex from the graph. Note that this does not disconnect
- * edges from the vertex before removing it. Removing a vertex connected to
- * the graph can result in dangling edges.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-void
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::remove_vertex(vertex_descriptor v)
-{
-}
-
-/**
- * Remove the given edge from the graph.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-void
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::remove_edge(edge_descriptor e)
-{
- vertex_descriptor u = this->edge(e).source();
- vertex_descriptor v = this->edge(e).target();
- BOOST_ASSERT(u.is_valid() && v.is_valid());
-
- this->vertex(u).disconnect_to(e);
- this->vertex(v).disconnect_from(e);
- edge_store::remove_edge(e);
-}
-
-/**
- * Remove all edges connecting vertices u and v from the graph.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-void
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::remove_edge(
- vertex_descriptor u,
- vertex_descriptor v)
-{
- // I suppose it would be a good idea to ensure that the local edges of
- // u and v are actually removed also.
- edge_store::remove_edge(u, v);
-}
-
-/**
- * Get an iterator range over the incident edges of the given vertex.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::incidence_range
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::incident_edges(vertex_descriptor v) const
-{
- return this->vertex(v).incident_edges();
-}
-
-/**
- * Get an iterator to the beginning of the the incident edges for the given
- * vertex.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::incidence_iterator
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::begin_incident_edges(vertex_descriptor v) const
-{
- return this->vertex(v).begin_incident_edges();
-}
-
-/**
- * Get an iterator past the end of the incident edges of the given vertex.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::incidence_iterator
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::end_incident_edges(vertex_descriptor v) const
-{
- return this->vertex(v).end_incident_edges();
-}
-
-/**
- * Get an iterator range over the adjacecnt vertices of the given vertex.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::adjacency_range
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::adjacent_vertices(vertex_descriptor v) const
-{
- return make_pair(begin_adjacent_vertices(v), end_adjacent_vertices(v));
-}
-
-/**
- * Get iterator to beginning of the adjacent edges from the given vertex.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::adjacency_iterator
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::begin_adjacent_vertices(vertex_descriptor v) const
-{
- return adjacency_iterator(this, v, begin_incident_edges(v));
-}
-
-/**
- * Get an iterator past the end of the adjacent edges of the given vertex.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::adjacency_iterator
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::end_adjacent_vertices(vertex_descriptor v) const
-{
- return adjacency_iterator(this, v, end_incident_edges(v));
-}
-
-/**
- * Get a descriptor for the given vertex.
- *
- * This may seem like a strange function, but there's currently no simple way
- * to transform between the two types.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::vertex_descriptor
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::descriptor(vertex_type const& v) const
-{
- typedef typename vertex_store::vertex_type stored_type;
- return vertex_store::descriptor(static_cast<stored_type const&>(v));
-}
-
-/**
- * Get vertex properties for the given vertex descriptor.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::vertex_properties&
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::properties(vertex_descriptor v)
-{
- return vertex_store::properties(v);
-}
-
-/**
- * Get vertex properties for the given vertex descriptor.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::vertex_properties const&
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::properties(vertex_descriptor v) const
-{
- return vertex_store::properties(v);
-}
-
-/**
- * Get edge properties for the given edge descriptor.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::edge_properties&
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::properties(edge_descriptor e)
-{
- return edge_store::properties(e);
-}
-
-/**
- * Get edge properties for the given edge descriptor.
- */
-template <BOOST_GRAPH_ADJLIST_PARAMS>
-typename adjacency_list<T,VP,EP,VS,ES,VES,AEP>::edge_properties const&
-adjacency_list<T,VP,EP,VS,ES,VES,AEP>::properties(edge_descriptor e) const
-{
- return edge_store::properties(e);
-}
-
 #undef BOOST_GRAPH_ADJLIST_PARAMS
 
 } /* namespace adj_list */
@@ -412,6 +59,6 @@
 } /* namespace boost */
 
 // Include a number common graph types.
-#include <boost/graphs/adjacency_list/graphs.hpp>
+// #include <boost/graphs/adjacency_list/graphs.hpp>
 
 #endif

Modified: sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/descriptor.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/descriptor.hpp (original)
+++ sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/descriptor.hpp 2008-06-02 20:17:21 EDT (Mon, 02 Jun 2008)
@@ -110,14 +110,14 @@
  * void*.
  */
 template <typename D>
-struct vertex_desc
+struct basic_vertex_descriptor
     : public descriptor<D>
 {
- inline vertex_desc()
+ inline basic_vertex_descriptor()
         : descriptor<D>()
     { }
 
- inline vertex_desc(D d)
+ inline basic_vertex_descriptor(D d)
         : descriptor<D>(d)
     { }
 };
@@ -127,14 +127,14 @@
  * void*.
  */
 template <typename D>
-struct edge_desc
+struct basic_edge_descriptor
     : public descriptor<D>
 {
- inline edge_desc()
+ inline basic_edge_descriptor()
         : descriptor<D>()
     { }
 
- inline edge_desc(D d)
+ inline basic_edge_descriptor(D d)
         : descriptor<D>(d)
     { }
 };

Modified: sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/directed/directed.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/directed/directed.hpp (original)
+++ sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/directed/directed.hpp 2008-06-02 20:17:21 EDT (Mon, 02 Jun 2008)
@@ -2,56 +2,17 @@
 #ifndef BOOST_GRAPHS_ADJACENCY_LIST_DIRECTED_HPP
 #define BOOST_GRAPHS_ADJACENCY_LIST_DIRECTED_HPP
 
-#include <boost/graphs/adjacency_list/storage_traits.hpp>
-
 namespace boost {
 namespace graphs {
 namespace adj_list {
 
-// Forward declarations
-template <typename VP, typename EP, typename V, typename E, template <typename> class VES> struct directed_vertex;
-template <typename VP, typename EP, typename V, typename E> struct directed_edge;
-
-// Unfortunately, I have to hack out a little tag dispatch here... This will
-// go away with the concepts.
-struct directed_tag { };
-
-/**
- * This is the metafunction for directed types.
- */
-template <
- typename VertexProps,
- typename EdgeProps,
- typename VertexStore,
- typename EdgeStore,
- template <typename> class VertexEdgeStore
- >
-struct directed
-{
- typedef directed_tag tag;
-
- typedef vertex_desc<
- typename storage_traits<VertexStore>::descriptor_type
- > vertex_descriptor;
-
- typedef edge_desc<
- typename storage_traits<EdgeStore>::descriptor_type
- > edge_descriptor;
-
- typedef directed_vertex<
- VertexProps, EdgeProps, vertex_descriptor, edge_descriptor, VertexEdgeStore
- > vertex_type;
-
- typedef directed_edge<
- VertexProps, EdgeProps, vertex_descriptor, edge_descriptor
- > edge_type;
-};
+struct directed { };
 
 } /* namespace adj_list */
 } /* namespace graphs */
 } /* namespace boost */
 
-#include <boost/graphs/adjacency_list/directed/vertex.hpp>
-#include <boost/graphs/adjacency_list/directed/edge.hpp>
+// #include <boost/graphs/adjacency_list/directed/vertex.hpp>
+// #include <boost/graphs/adjacency_list/directed/edge.hpp>
 
 #endif

Modified: sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/es/edge_vector.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/es/edge_vector.hpp (original)
+++ sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/es/edge_vector.hpp 2008-06-02 20:17:21 EDT (Mon, 02 Jun 2008)
@@ -10,6 +10,21 @@
 namespace graphs {
 namespace adj_list {
 
+template <template <typename> class Allocator>
+struct basic_edge_vector
+{
+ typedef basic_edge_descriptor<std::size_t> descriptor_type;
+
+ template <typename Edge>
+ struct type
+ {
+ };
+};
+
+struct edge_vector : basic_edge_vector<std::allocator> { };
+
+#if 0
+
 /**
  * The edge vector implements a trivial multiset of edges for a graph (i.e., a
  * multigraph). Note that the underlying store does not permit the removal of
@@ -163,6 +178,8 @@
     return edge_iterator(_edges, _edges.end());
 }
 
+#endif
+
 } /* namespace adj_list */
 } /* namespace graphs */
 } /* namespace boost */

Modified: sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/undirected/undirected.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/undirected/undirected.hpp (original)
+++ sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/undirected/undirected.hpp 2008-06-02 20:17:21 EDT (Mon, 02 Jun 2008)
@@ -2,74 +2,17 @@
 #ifndef BOOST_GRAPHS_ADJACENCY_LIST_UNDIRECTED_HPP
 #define BOOST_GRAPHS_ADJACENCY_LIST_UNDIRECTED_HPP
 
-#include <list>
-
-#include <boost/graphs/utility/unordered_pair.hpp>
-#include <boost/graphs/adjacency_list/vertex.hpp>
-#include <boost/graphs/adjacency_list/edge.hpp>
-#include <boost/graphs/adjacency_list/storage_traits.hpp>
-
 namespace boost {
 namespace graphs {
 namespace adj_list {
 
-// Implementation of undirected adjacency lists.
-
-// Forward declarations
-template <typename VP, typename EP, typename V, typename E, template <typename> class VES> struct undirected_vertex;
-template <typename VP, typename EP, typename V, typename E> struct undirected_edge;
-
-// Unfortunately, I have to hack out a little tag dispatch here... This will
-// go away with the concepts.
-struct undirected_tag { };
-
-/**
- * The undirected template is essentially responsible for generating the types
- * of verties and edges. Note that the definition of these types also depends,
- * to some degree, on the underlying storage mechanisms. Specifically, these
- * stores contribute information about the specific types of descriptors
- * employed by the adjacency list type.
- *
- * @todo Unfortunately, we are actually instantiating these types over dummy
- * stores in order to access their storage traits - basically deciding whether
- * the descriptor will be an integer or a void ptr. There doesn't really seem
- * to be any other way to do this since we're actually passing the stores as
- * template template parameters - which have no type. Perhaps the new language
- * will offer better solutions.
- */
-template <
- typename VertexProps,
- typename EdgeProps,
- typename VertexStore,
- typename EdgeStore,
- template <typename> class VertexEdgeStore
- >
-struct undirected
-{
- typedef undirected_tag tag;
-
- typedef vertex_desc<
- typename storage_traits<VertexStore>::descriptor_type
- > vertex_descriptor;
-
- typedef edge_desc<
- typename storage_traits<EdgeStore>::descriptor_type
- > edge_descriptor;
-
- typedef undirected_vertex<
- VertexProps, EdgeProps, vertex_descriptor, edge_descriptor, VertexEdgeStore
- > vertex_type;
-
- typedef undirected_edge<
- VertexProps, EdgeProps, vertex_descriptor, edge_descriptor
- > edge_type;
-};
+struct undirected { };
 
 } /* namespace adj_list */
 } /* namespace graphs */
 } /* namespace boost */
 
 #include <boost/graphs/adjacency_list/undirected/vertex.hpp>
-#include <boost/graphs/adjacency_list/undirected/edge.hpp>
+// #include <boost/graphs/adjacency_list/undirected/edge.hpp>
 
 #endif

Modified: sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/undirected/vertex.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/undirected/vertex.hpp (original)
+++ sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/undirected/vertex.hpp 2008-06-02 20:17:21 EDT (Mon, 02 Jun 2008)
@@ -8,14 +8,14 @@
 namespace graphs {
 namespace adj_list {
 
+template <typename VertexProps, typename EdgeStore>
+struct undirected_vertex
+{
+};
+
+#if 0
+
 /**
- * An undirected vertex tracks the incident edges of the given vertex. Note
- * that the edges actually being stored are pointers to edges in the graph's
- * edge list. The reason for this is so we don't duplicate the properties
- * of each edge.
- *
- * @todo What happens if I store incident edges as a pair... The edge and the
- * opposite end. That might be kind of interesting.
  */
 template <
         typename VertexProps,
@@ -224,6 +224,8 @@
 
 #undef BOOST_GRAPH_UV_PARAMS
 
+#endif
+
 } /* namespace adj_list */
 } /* namespace graphs */
 } /* namespace boost */

Modified: sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/vs/vertex_vector.hpp
==============================================================================
--- sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/vs/vertex_vector.hpp (original)
+++ sandbox/SOC/2008/graphs/branches/tagged/boost/graphs/adjacency_list/vs/vertex_vector.hpp 2008-06-02 20:17:21 EDT (Mon, 02 Jun 2008)
@@ -12,6 +12,25 @@
 namespace adj_list {
 
 /**
+ */
+template <template <typename> class Allocator>
+struct basic_vertex_vector
+{
+ typedef basic_vertex_descriptor<std::size_t> descriptor_type;
+
+ template <typename Vertex>
+ struct type
+ {
+ typedef Allocator<Vertex> allocator;
+ typedef std::vector<Vertex, allocator> store;
+ };
+};
+
+struct vertex_vector : basic_vertex_vector<std::allocator> { };
+
+#if 0
+
+/**
  * The vertex_vector template implements veretex storage for adjacency lists
  * as a vector. This essentially provides a heavily constrained interface
  * to the underlying vector. Note that many operations normally supported by
@@ -83,19 +102,19 @@
 
 /**
  * The default specialization of a vector store.
- */
 template <typename Vertex>
 struct vertex_vector : basic_vertex_vector<Vertex, std::allocator> { };
+ */
 
 /**
  * Apparently, we have to provide a specific partial specialization for each
  * specialized storage. Is this right? Is it wrong? Is the compiler broken?
- */
 template <typename Vertex>
 struct storage_traits< vertex_vector<Vertex> >
 {
     typedef std::size_t descriptor_type;
 };
+ */
 
 // Functions
 
@@ -218,6 +237,8 @@
     return *vertex(v);
 }
 
+#endif
+
 } /* namespace adj_list */
 } /* namesapce graphs */
 } /* namespace boost */


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