Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57898 - in trunk: boost/graph boost/graph/detail boost/graph/distributed libs/graph/doc libs/graph/test
From: jewillco_at_[hidden]
Date: 2009-11-24 13:38:29


Author: jewillco
Date: 2009-11-24 13:38:28 EST (Tue, 24 Nov 2009)
New Revision: 57898
URL: http://svn.boost.org/trac/boost/changeset/57898

Log:
Removed old CSR interface; fixes #3135
Text files modified:
   trunk/boost/graph/compressed_sparse_row_graph.hpp | 187 ---------------------------------------
   trunk/boost/graph/detail/compressed_sparse_row_struct.hpp | 20 ----
   trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp | 104 ----------------------
   trunk/libs/graph/doc/compressed_sparse_row.html | 158 ++++----------------------------
   trunk/libs/graph/test/csr_graph_test.cpp | 61 -------------
   5 files changed, 26 insertions(+), 504 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-11-24 13:38:28 EST (Tue, 24 Nov 2009)
@@ -47,26 +47,6 @@
 # error You will need a compiler that conforms better to the C++ standard.
 #endif
 
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-#if BOOST_VERSION >= 103800
-#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
-#pragma message ("Using deprecated BGL compressed sparse row graph interface --")
-#pragma message ("please see the documentation for the new interface and then")
-#pragma message ("#define BOOST_GRAPH_USE_NEW_CSR_INTERFACE before including")
-#pragma message ("<boost/graph/compressed_sparse_row_graph.hpp>")
-#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-#endif
-#warning "Using deprecated BGL compressed sparse row graph interface --"
-#warning "please see the documentation for the new interface and then"
-#warning "#define BOOST_GRAPH_USE_NEW_CSR_INTERFACE before including"
-#warning "<boost/graph/compressed_sparse_row_graph.hpp>"
-#endif
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-#define BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-#endif
-
 namespace boost {
 
 // A tag type indicating that the graph in question is a compressed
@@ -78,7 +58,6 @@
 // vertex.
 enum edges_are_sorted_t {edges_are_sorted};
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 // A type (edges_are_sorted_global_t) and a value (edges_are_sorted_global)
 // used to indicate that the edge list passed into the CSR graph is already
 // sorted by source vertex.
@@ -131,8 +110,6 @@
 // distributed CSR constructors.
 enum edges_are_unsorted_global_t {edges_are_unsorted_global};
 
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 /****************************************************************************
  * Local helper macros to reduce typing and clutter later on. *
  ****************************************************************************/
@@ -155,7 +132,6 @@
    compressed_sparse_row_graph<bidirectionalS, VertexProperty, EdgeProperty, \
                                GraphProperty, Vertex, EdgeIndex>
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 namespace detail {
   template <typename T>
   struct default_construct_iterator: public boost::iterator_facade<default_construct_iterator<T>, T, boost::random_access_traversal_tag, const T&> {
@@ -188,7 +164,6 @@
     }
   };
 }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
 /** Compressed sparse row graph.
  *
@@ -280,7 +255,6 @@
   compressed_sparse_row_graph(vertices_size_type numverts)
     : inherited_vertex_properties(numverts), m_forward(numverts) {}
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   // From number of vertices and unsorted list of edges
   template <typename MultiPassInputIterator>
   compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t,
@@ -336,38 +310,6 @@
   {
     m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, ep_iter, numlocalverts, global_to_local, source_pred);
   }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-
- // From number of vertices and sorted list of edges (deprecated
- // interface)
- template<typename InputIterator>
- compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
- vertices_size_type numverts,
- edges_size_type numedges = 0,
- const GraphProperty& prop = GraphProperty())
- : m_property(prop)
- {
- m_forward.assign_from_sorted_edges(edge_begin, edge_end, identity_property_map(), keep_all(), numverts, numedges);
- inherited_vertex_properties::resize(numverts);
- }
-
- // From number of vertices and sorted list of edges (deprecated
- // interface)
- template<typename InputIterator, typename EdgePropertyIterator>
- compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
- EdgePropertyIterator ep_iter,
- vertices_size_type numverts,
- edges_size_type numedges = 0,
- const GraphProperty& prop = GraphProperty())
- : m_property(prop)
- {
- m_forward.assign_from_sorted_edges(edge_begin, edge_end, ep_iter, identity_property_map(), keep_all(), numverts, numedges);
- inherited_vertex_properties::resize(numverts);
- }
-
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
 
   // From number of vertices and sorted list of edges (new interface)
   template<typename InputIterator>
@@ -396,7 +338,6 @@
     inherited_vertex_properties::resize(numverts);
   }
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   // From number of vertices and sorted list of edges, filtered and global (new interface)
   template<typename InputIterator, typename GlobalToLocal, typename SourcePred>
   compressed_sparse_row_graph(edges_are_sorted_global_t,
@@ -565,8 +506,6 @@
     m_forward.assign_sources_and_targets_global(sources, targets, edge_props, numlocalverts, global_to_local);
   }
 
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 
   // Requires IncidenceGraph and a vertex index map
   template<typename Graph, typename VertexIndexMap>
@@ -644,7 +583,6 @@
     inherited_vertex_properties::resize(numverts);
   }
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   // Add edges from a sorted (smallest sources first) range of pairs and edge
   // properties
   template <typename BidirectionalIteratorOrig, typename EPIterOrig,
@@ -763,7 +701,6 @@
                      EPIterator ep_iter, EPIterator ep_iter_end) {
     this->add_edges_internal(first, last, ep_iter, ep_iter_end, identity_property_map());
   }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
   using inherited_vertex_properties::operator[];
 
@@ -784,8 +721,6 @@
   GraphProperty m_property;
 };
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-// Bidir is only supported in this mode
 template<typename VertexProperty,
          typename EdgeProperty,
          typename GraphProperty,
@@ -1153,7 +1088,6 @@
   backward_type m_backward;
   GraphProperty m_property;
 };
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
 // Construction functions
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1194,44 +1128,6 @@
   return old_num_verts_plus_one - 1;
 }
 
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-// This function requires that (src, tgt) be lexicographically at least as
-// large as the largest edge in the graph so far
-template<BOOST_DIR_CSR_GRAPH_TEMPLATE_PARMS>
-inline typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor
-add_edge(Vertex src, Vertex tgt, BOOST_DIR_CSR_GRAPH_TYPE& g) {
- assert ((g.m_last_source == 0 || src >= g.m_last_source - 1) &&
- src < num_vertices(g));
- EdgeIndex num_edges_orig = g.m_forward.m_column.size();
- for (; g.m_last_source <= src; ++g.m_last_source)
- g.m_forward.m_rowstart[g.m_last_source] = num_edges_orig;
- g.m_forward.m_rowstart[src + 1] = num_edges_orig + 1;
- g.m_forward.m_column.push_back(tgt);
- typedef typename BOOST_DIR_CSR_GRAPH_TYPE::edge_push_back_type push_back_type;
- g.edge_properties().push_back(push_back_type());
- return typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor(src, num_edges_orig);
-}
-
-// This function requires that src be at least as large as the largest source
-// in the graph so far
-template<BOOST_DIR_CSR_GRAPH_TEMPLATE_PARMS>
-inline typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor
-add_edge(Vertex src, Vertex tgt,
- typename BOOST_DIR_CSR_GRAPH_TYPE::edge_bundled const& p,
- BOOST_DIR_CSR_GRAPH_TYPE& g) {
- assert ((g.m_last_source == 0 || src >= g.m_last_source - 1) &&
- src < num_vertices(g));
- EdgeIndex num_edges_orig = g.m_forward.m_column.size();
- for (; g.m_last_source <= src; ++g.m_last_source)
- g.m_forward.m_rowstart[g.m_last_source] = num_edges_orig;
- g.m_forward.m_rowstart[src + 1] = num_edges_orig + 1;
- g.m_forward.m_column.push_back(tgt);
- g.edge_properties().push_back(p);
- return typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor(src, num_edges_orig);
-}
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   // Add edges from a sorted (smallest sources first) range of pairs and edge
   // properties
   template <BOOST_DIR_CSR_GRAPH_TEMPLATE_PARMS, typename BidirectionalIteratorOrig,
@@ -1316,7 +1212,6 @@
             BOOST_DIR_CSR_GRAPH_TYPE& g) {
     g.add_edges_internal(first, last, ep_iter, ep_iter_end, global_to_local);
   }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
 // From VertexListGraph
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1349,29 +1244,6 @@
   return g.m_forward.m_column[e.idx];
 }
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-namespace detail {
- template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
- inline EdgeIndex get_actual_row_start
- (const BOOST_CSR_GRAPH_TYPE& /*g*/,
- EdgeIndex /*rowstart_i_minus_1*/, EdgeIndex rowstart_i)
- {
- return rowstart_i;
- }
-}
-#else
-namespace detail {
- template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
- inline EdgeIndex get_actual_row_start
- (const BOOST_CSR_GRAPH_TYPE& /*g*/,
- EdgeIndex rowstart_i_minus_1, EdgeIndex rowstart_i)
- {
- // Special case to allow incremental construction
- return (std::max)(rowstart_i_minus_1, rowstart_i);
- }
-}
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
 inline std::pair<typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator,
                  typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator>
@@ -1382,8 +1254,7 @@
   EdgeIndex v_row_start = g.m_forward.m_rowstart[v];
   EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1];
   return std::make_pair(it(ed(v, v_row_start)),
- it(ed(v, detail::get_actual_row_start
- (g, v_row_start, next_row_start))));
+ it(ed(v, next_row_start)));
 }
 
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1392,11 +1263,9 @@
 {
   EdgeIndex v_row_start = g.m_forward.m_rowstart[v];
   EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1];
- return detail::get_actual_row_start(g, v_row_start, next_row_start) - v_row_start;
+ return next_row_start - v_row_start;
 }
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 template<BOOST_BIDIR_CSR_GRAPH_TEMPLATE_PARMS>
 inline std::pair<typename BOOST_BIDIR_CSR_GRAPH_TYPE::in_edge_iterator,
                  typename BOOST_BIDIR_CSR_GRAPH_TYPE::in_edge_iterator>
@@ -1419,8 +1288,6 @@
   return next_row_start - v_row_start;
 }
 
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 // From AdjacencyGraph
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
 inline std::pair<typename BOOST_CSR_GRAPH_TYPE::adjacency_iterator,
@@ -1430,9 +1297,7 @@
   EdgeIndex v_row_start = g.m_forward.m_rowstart[v];
   EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1];
   return std::make_pair(g.m_forward.m_column.begin() + v_row_start,
- g.m_forward.m_column.begin() +
- detail::get_actual_row_start
- (g, v_row_start, next_row_start));
+ g.m_forward.m_column.begin() + next_row_start);
 }
 
 // Extra, common functions
@@ -1444,43 +1309,6 @@
   return i;
 }
 
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-// These require that the out edges from a vertex are sorted, which is only
-// guaranteed by the old interface
-
-// Unlike for an adjacency_matrix, edge_range and edge take lg(out_degree(i))
-// time
-template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
-inline std::pair<typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator,
- typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator>
-edge_range(Vertex i, Vertex j, const BOOST_CSR_GRAPH_TYPE& g)
-{
- typedef typename std::vector<Vertex>::const_iterator adj_iter;
- typedef typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter;
- typedef typename BOOST_CSR_GRAPH_TYPE::edge_descriptor edge_desc;
- std::pair<adj_iter, adj_iter> raw_adjacencies = adjacent_vertices(i, g);
- std::pair<adj_iter, adj_iter> adjacencies =
- std::equal_range(raw_adjacencies.first, raw_adjacencies.second, j);
- EdgeIndex idx_begin = adjacencies.first - g.m_forward.m_column.begin();
- EdgeIndex idx_end = adjacencies.second - g.m_forward.m_column.begin();
- return std::make_pair(out_edge_iter(edge_desc(i, idx_begin)),
- out_edge_iter(edge_desc(i, idx_end)));
-}
-
-template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
-inline std::pair<typename BOOST_CSR_GRAPH_TYPE::edge_descriptor, bool>
-edge(Vertex i, Vertex j, const BOOST_CSR_GRAPH_TYPE& g)
-{
- typedef typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter;
- std::pair<out_edge_iter, out_edge_iter> range = edge_range(i, j, g);
- if (range.first == range.second)
- return std::make_pair(typename BOOST_CSR_GRAPH_TYPE::edge_descriptor(),
- false);
- else
- return std::make_pair(*range.first, true);
-}
-
-#else // !BOOST_GRAPH_USE_OLD_CSR_INTERFACE
 // edge() can be provided in linear time for the new interface
 
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1497,8 +1325,6 @@
                         false);
 }
 
-#endif // !BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-
 // Find an edge given its index in the graph
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
 inline typename BOOST_CSR_GRAPH_TYPE::edge_descriptor
@@ -1508,14 +1334,7 @@
   assert (idx < num_edges(g));
   row_start_iter src_plus_1 =
     std::upper_bound(g.m_forward.m_rowstart.begin(),
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- // This handles the case where there are some vertices
- // with rowstart 0 after the last provided vertex; this
- // case does not happen with the new interface
- g.m_forward.m_rowstart.begin() + g.m_last_source + 1,
-#else // !BOOST_GRAPH_USE_OLD_CSR_INTERFACE
                      g.m_forward.m_rowstart.end(),
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
                      idx);
     // Get last source whose rowstart is at most idx
     // upper_bound returns this position plus 1

Modified: trunk/boost/graph/detail/compressed_sparse_row_struct.hpp
==============================================================================
--- trunk/boost/graph/detail/compressed_sparse_row_struct.hpp (original)
+++ trunk/boost/graph/detail/compressed_sparse_row_struct.hpp 2009-11-24 13:38:28 EST (Tue, 24 Nov 2009)
@@ -81,17 +81,9 @@
 
     std::vector<EdgeIndex> m_rowstart;
     std::vector<Vertex> m_column;
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- // This member is only needed to support add_edge(), which is not provided by
- // the new interface
- Vertex m_last_source; // Last source of added edge, plus one
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
 
     compressed_sparse_row_structure(Vertex numverts = 0)
       : m_rowstart(numverts + 1, EdgeIndex(0)), m_column()
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- , m_last_source(numverts)
-#endif
       {}
     
     // Rebuild graph from number of vertices and multi-pass unsorted list of
@@ -310,24 +302,12 @@
       for (Vertex i = 0; i != numverts; ++i) {
         m_rowstart[i] = current_edge;
         g_vertex v = ordered_verts_of_g[i];
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- // Out edges in a single vertex are only sorted for the old interface
- EdgeIndex num_edges_before_this_vertex = current_edge;
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
         g_out_edge_iter ei, ei_end;
         for (tie(ei, ei_end) = out_edges(v, g); ei != ei_end; ++ei) {
           m_column[current_edge++] = get(vi, target(*ei, g));
         }
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- // Out edges in a single vertex are only sorted for the old interface
- std::sort(m_column.begin() + num_edges_before_this_vertex,
- m_column.begin() + current_edge);
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
       }
       m_rowstart[numverts] = current_edge;
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- m_last_source = numverts;
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
     }
 
     // Add edges from a sorted (smallest sources first) range of pairs and edge

Modified: trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp
==============================================================================
--- trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp (original)
+++ trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp 2009-11-24 13:38:28 EST (Tue, 24 Nov 2009)
@@ -17,8 +17,6 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
-#define BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 #include <boost/graph/compressed_sparse_row_graph.hpp>
 #include <boost/graph/distributed/selector.hpp>
 #include <boost/mpl/if.hpp>
@@ -179,8 +177,6 @@
                               const Distribution& dist)
     : m_process_group(pg), m_distribution(dist), m_base(numverts) {}
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
   template <typename InputIterator>
   compressed_sparse_row_graph(edges_are_unsorted_t,
                               InputIterator edge_begin, InputIterator edge_end,
@@ -322,8 +318,6 @@
                               const Distribution& dist,
                               const GraphProperty& prop = GraphProperty());
 
-#endif
-
   template<typename InputIterator>
   compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
                               vertices_size_type numverts,
@@ -706,7 +700,6 @@
 // -----------------------------------------------------------------
 // Graph constructors
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 // Returns true if a vertex belongs to a process according to a distribution
 template <typename OwnerMap, typename ProcessId>
 struct local_vertex {
@@ -826,13 +819,10 @@
   return boost::make_transform_iterator(
     it, index_to_vertex_func<Distribution, Graph>(dist, g));
 }
-#endif
 
 // Forward declaration of csr_vertex_owner_map
 template<typename ProcessID, typename Key> class csr_vertex_owner_map;
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
 template<typename InputIterator>
 BOOST_DISTRIB_CSR_GRAPH_TYPE::
@@ -1215,8 +1205,6 @@
   // TODO: set property on m_base?
 }
 
-#endif
-
 //
 // Old (untagged) ctors, these default to the unsorted sequential ctors
 //
@@ -1229,9 +1217,6 @@
                             const GraphProperty& prop)
   : m_process_group(pg),
     m_distribution(parallel::block(m_process_group, numverts)),
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- m_base(m_distribution.block_size(process_id(m_process_group), numverts))
-#else
     m_base(edges_are_unsorted_global,
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_begin, *this),
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_end, *this),
@@ -1240,28 +1225,8 @@
            local_vertex<csr_vertex_owner_map<process_id_type, vertex_descriptor>,
                         process_id_type> (get(vertex_owner, *this), process_id(pg)),
            prop)
-#endif
            
 {
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- parallel::block dist(m_process_group, numverts);
-
- // Allows us to add edges
- m_base.m_last_source = 0;
-
- typename ProcessGroup::process_id_type id = process_id(m_process_group);
-
- while (edge_begin != edge_end) {
- vertex_descriptor src = edge_begin->first;
- if (static_cast<process_id_type>(dist(src)) == id) {
- vertex_descriptor tgt =
- make_vertex_descriptor(dist(edge_begin->second),
- dist.local(edge_begin->second));
- add_edge(dist.local(src), tgt, m_base);
- }
- ++edge_begin;
- }
-#endif
 }
 
 template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1275,9 +1240,6 @@
   : m_process_group(pg),
 
     m_distribution(parallel::block(m_process_group, numverts)),
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- m_base(m_distribution.block_size(process_id(m_process_group), numverts))
-#else
     m_base(edges_are_unsorted_global,
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_begin, *this),
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_end, *this),
@@ -1287,28 +1249,7 @@
            local_vertex<csr_vertex_owner_map<process_id_type, vertex_descriptor>,
                         process_id_type> (get(vertex_owner, *this), process_id(pg)),
            prop)
-#endif
 {
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- parallel::block dist(m_process_group, numverts);
-
- // Allows us to add edges
- m_base.m_last_source = 0;
-
- typename ProcessGroup::process_id_type id = process_id(m_process_group);
-
- while (edge_begin != edge_end) {
- EdgeIndex src = edge_begin->first;
- if (static_cast<process_id_type>(dist(src)) == id) {
- EdgeIndex tgt =
- make_vertex_descriptor(dist(edge_begin->second),
- dist.local(edge_begin->second));
- add_edge(dist.local(src), tgt, *ep_iter, m_base);
- }
- ++edge_begin;
- ++ep_iter;
- }
-#endif
 }
 
 template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1321,9 +1262,6 @@
                             const GraphProperty& prop)
   : m_process_group(pg),
     m_distribution(dist),
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- m_base(dist.block_size(process_id(m_process_group), numverts))
-#else
     m_base(edges_are_unsorted_global,
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_begin, *this),
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_end, *this),
@@ -1332,27 +1270,7 @@
            local_vertex<csr_vertex_owner_map<process_id_type, vertex_descriptor>,
                         process_id_type> (get(vertex_owner, *this), process_id(pg)),
            prop)
-#endif
 {
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- // Allows us to add edges
- m_base.m_last_source = 0;
-
- typename ProcessGroup::process_id_type id = process_id(m_process_group);
-
- while (edge_begin != edge_end) {
- vertex_descriptor src = edge_begin->first;
- if (static_cast<process_id_type>(dist(src)) == id) {
- vertex_descriptor tgt =
- make_vertex_descriptor(dist(edge_begin->second),
- dist.local(edge_begin->second));
- assert(get(vertex_owner, *this, tgt) == dist(edge_begin->second));
- assert(get(vertex_local, *this, tgt) == dist.local(edge_begin->second));
- add_edge(dist.local(src), tgt, m_base);
- }
- ++edge_begin;
- }
-#endif
 }
 
 template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1367,9 +1285,6 @@
                             const GraphProperty& prop)
   : m_process_group(pg),
     m_distribution(dist),
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- m_base(dist.block_size(process_id(m_process_group), numverts))
-#else
     m_base(edges_are_unsorted_global,
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_begin, *this),
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_end, *this),
@@ -1378,26 +1293,7 @@
            local_vertex<csr_vertex_owner_map<process_id_type, vertex_descriptor>,
                         process_id_type> (get(vertex_owner, *this), process_id(pg)),
            prop)
-#endif
 {
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- // Allows us to add edges
- m_base.m_last_source = 0;
-
- typename ProcessGroup::process_id_type id = process_id(m_process_group);
-
- while (edge_begin != edge_end) {
- EdgeIndex src = edge_begin->first;
- if (static_cast<process_id_type>(dist(src)) == id) {
- EdgeIndex tgt =
- make_vertex_descriptor(dist(edge_begin->second),
- dist.local(edge_begin->second));
- add_edge(dist.local(src), tgt, *ep_iter, m_base);
- }
- ++edge_begin;
- ++ep_iter;
- }
-#endif
 }
 
 // -----------------------------------------------------------------

Modified: trunk/libs/graph/doc/compressed_sparse_row.html
==============================================================================
--- trunk/libs/graph/doc/compressed_sparse_row.html (original)
+++ trunk/libs/graph/doc/compressed_sparse_row.html 2009-11-24 13:38:28 EST (Tue, 24 Nov 2009)
@@ -49,17 +49,6 @@
     applications or for very large graphs that you do not need to
     change.</p>
 
- <p>There are two interfaces to the compressed sparse row graph. The
- old interface requires that all out edges from a single vertex are
- sorted by target, and does not support construction of the graph from
- unsorted arrays of sources and targets. The new interface has these
- new constructors, but does not support incremental construction of the
- graph or the <tt>edge_range()</tt> and <tt>edge()</tt> functions. The
- old interface is the default, but will be removed in a later version of
- Boost. To select the new interface, add <tt>#define
- BOOST_GRAPH_USE_NEW_CSR_INTERFACE</tt> before including
- <tt>&lt;boost/graph/compressed_sparse_row_graph.hpp&gt;</tt>.</p>
-
     <p>The CSR format stores vertices and edges in separate arrays,
     with the indices into these arrays corresponding to the identifier
     for the vertex or edge, respectively. The edge array is sorted by
@@ -79,8 +68,8 @@
     the template parameters. The
     <tt>Directed</tt> template parameter controls whether one edge direction
     (the default) or both directions are stored. A directed CSR graph has
- <tt>Directed</tt> = <tt>directedS</tt> and a bidirectional CSR graph (only
- supported with the new interface and with a limited set of constructors)
+ <tt>Directed</tt> = <tt>directedS</tt> and a bidirectional CSR graph (with
+ a limited set of constructors)
     has <tt>Directed</tt> = <tt>bidirectionalS</tt>.</p>
 
     <ul>
@@ -121,7 +110,7 @@
   <i>// Graph constructors</i>
   <a href="#default-const">compressed_sparse_row_graph</a>();
 
- <i>// Unsorted edge list constructors <b>(new interface only)</b></i>
+ <i>// Unsorted edge list constructors </i>
   template&lt;typename InputIterator&gt;
   <a href="#edge-const">compressed_sparse_row_graph</a>(edges_are_unsorted_t,
                               InputIterator edge_begin, InputIterator edge_end,
@@ -148,21 +137,7 @@
                               vertices_size_type numverts,
                               const GraphProperty&amp; prop = GraphProperty());
 
- <i>// Old sorted edge list constructors <b>(old interface only)</b></i>
- template&lt;typename InputIterator&gt;
- compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
- vertices_size_type numverts,
- edges_size_type numedges = 0,
- const GraphProperty&amp; prop = GraphProperty());
-
- template&lt;typename InputIterator, typename EdgePropertyIterator&gt;
- compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
- EdgePropertyIterator ep_iter,
- vertices_size_type numverts,
- edges_size_type numedges = 0,
- const GraphProperty&amp; prop = GraphProperty());
-
- <i>// New sorted edge list constructors <b>(both interfaces, directed only)</b></i>
+ <i>// New sorted edge list constructors <b>(directed only)</b></i>
   template&lt;typename InputIterator&gt;
   <a href="#edge-sorted-const">compressed_sparse_row_graph</a>(edges_are_sorted_t,
                               InputIterator edge_begin, InputIterator edge_end,
@@ -178,7 +153,7 @@
                               edges_size_type numedges = 0,
                               const GraphProperty&amp; prop = GraphProperty());
 
- <i>// In-place unsorted edge list constructors <b>(new interface and directed only)</b></i>
+ <i>// In-place unsorted edge list constructors <b>(directed only)</b></i>
   template&lt;typename InputIterator&gt;
   <a href="#edge-inplace-const">compressed_sparse_row_graph</a>(construct_inplace_from_sources_and_targets_t,
                               std::vector&lt;vertex_descriptor&gt;&amp; sources,
@@ -194,7 +169,7 @@
                               vertices_size_type numverts,
                               const GraphProperty&amp; prop = GraphProperty());
 
- <i>// Miscellaneous constructors <b>(both interfaces, directed only)</b></i>
+ <i>// Miscellaneous constructors <b>(directed only)</b></i>
   template&lt;typename Graph, typename VertexIndexMap&gt;
   <a href="#graph-const">compressed_sparse_row_graph</a>(const Graph&amp; g, const VertexIndexMap&amp; vi,
                               vertices_size_type numverts,
@@ -206,7 +181,7 @@
   template&lt;typename Graph&gt;
   explicit compressed_sparse_row_graph(const Graph&amp; g);
 
- <i>// Graph mutators (both interfaces, directed only)</i>
+ <i>// Graph mutators (directed only)</i>
   template&lt;typename Graph, typename VertexIndexMap&gt;
   void assign(const Graph&amp; g, const VertexIndexMap&amp; vi,
               vertices_size_type numverts, edges_size_type numedges);
@@ -217,51 +192,46 @@
   template&lt;typename Graph&gt;
   void assign(const Graph&amp; g);
 
- <i>// Property Access (both interfaces)</i>
+ <i>// Property Access</i>
   VertexProperty&amp; operator[](vertex_descriptor v);
   const VertexProperty&amp; operator[](vertex_descriptor v) const;
   EdgeProperty&amp; operator[](edge_descriptor v);
   const EdgeProperty&amp; operator[](edge_descriptor v) const;
 };
 
-<i>// Incidence Graph requirements (both interfaces)</i>
+<i>// Incidence Graph requirements</i>
 vertex_descriptor source(edge_descriptor, const compressed_sparse_row_graph&amp;);
 vertex_descriptor target(edge_descriptor, const compressed_sparse_row_graph&amp;);
 std::pair&lt;out_edge_iterator, out_edge_iterator&gt;
   out_edges(vertex_descriptor, const compressed_sparse_row_graph&amp;);
 degree_size_type out_degree(vertex_descriptor v, const compressed_sparse_row_graph&amp;);
 
-<i>// Bidirectional Graph requirements (new interface and bidirectional only)</i>
+<i>// Bidirectional Graph requirements (bidirectional only)</i>
 std::pair&lt;in_edge_iterator, in_edge_iterator&gt;
   in_edges(vertex_descriptor, const compressed_sparse_row_graph&amp;);
 degree_size_type in_degree(vertex_descriptor v, const compressed_sparse_row_graph&amp;);
 
-<i>// Adjacency Graph requirements (both interfaces)</i>
+<i>// Adjacency Graph requirements</i>
 std::pair&lt;adjacency_iterator, adjacency_iterator&gt;
   adjacent_vertices(vertex_descriptor, const compressed_sparse_row_graph&amp;);
 
-<i>// Vertex List Graph requirements (both interfaces)</i>
+<i>// Vertex List Graph requirements</i>
 std::pair&lt;vertex_iterator, vertex_iterator&gt; vertices(const compressed_sparse_row_graph&amp;);
 vertices_size_type num_vertices(const compressed_sparse_row_graph&amp;);
 
-<i>// Edge List Graph requirements (both interfaces)</i>
+<i>// Edge List Graph requirements</i>
 std::pair&lt;edge_iterator, edge_iterator&gt; edges(const compressed_sparse_row_graph&amp;);
 edges_size_type num_edges(const compressed_sparse_row_graph&amp;);
 
-<i>// Vertex access (both interfaces)</i>
+<i>// Vertex access</i>
 vertex_descriptor vertex(vertices_size_type i, const compressed_sparse_row_graph&amp;);
 
 <i>// Edge access</i>
-<b>(old interface only)</b>
-std::pair&lt;out_edge_iterator, out_edge_iterator&gt;
- edge_range(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;);
-<b>(both interfaces)</b>
 std::pair&lt;edge_descriptor, bool&gt;
   <a href="#edge">edge</a>(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;);
-<b>(both interfaces)</b>
 edge_descriptor edge_from_index(edges_size_type i, const compressed_sparse_row_graph&amp;);
 
-<i>// Property map accessors (both interfaces)</i>
+<i>// Property map accessors</i>
 template&lt;typename PropertyTag&gt;
 property_map&lt;compressed_sparse_row_graph, PropertyTag&gt;::type
 <a href="#get">get</a>(PropertyTag, compressed_sparse_row_graph&amp; g)
@@ -290,31 +260,19 @@
                   const typename graph_property&lt;compressed_sparse_row_graph, GraphPropertyTag&gt;::type&amp; value);
 
 <i>// Incremental construction functions</i>
-<b>(old interface only)</b>
-template&lt;typename Graph&gt;
-vertex_descriptor add_vertex(compressed_sparse_row_graph&amp; g);
-
-<b>(old interface only)</b>
-template&lt;typename Graph&gt;
-vertex_descriptor add_vertices(vertices_size_type count, compressed_sparse_row_graph&amp; g);
-
-<b>(old interface only)</b>
-template&lt;typename Graph&gt;
-edge_descriptor add_edge(vertex_descriptor src, vertex_descriptor tgt, compressed_sparse_row_graph&amp; g);
-
-<b>(new interface and directed only)</b>
+<b>(directed only)</b>
 template&lt;typename InputIterator, typename Graph&gt;
 void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_graph&amp; g);
 
-<b>(new interface and directed only)</b>
+<b>(directed only)</b>
 template&lt;typename InputIterator, typename EPIter, typename Graph&gt;
 void add_edges(InputIterator first, InputIterator last, EPIter ep_first, EPIter ep_last, compressed_sparse_row_graph&amp; g);
 
-<b>(new interface and directed only)</b>
+<b>(directed only)</b>
 template&lt;typename BidirectionalIterator, typename Graph&gt;
 void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, compressed_sparse_row_graph&amp; g);
 
-<b>(new interface and directed only)</b>
+<b>(directed only)</b>
 template&lt;typename BidirectionalIterator, typename EPIter, typename Graph&gt;
 void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, EPIter ep_iter, compressed_sparse_row_graph&amp; g);
 
@@ -465,7 +423,6 @@
       edge_end)</code> do not need to be sorted. This constructor uses extra
       memory to save the edge information before adding it to the graph,
       avoiding the requirement for the iterator to have multi-pass capability.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <p class="indent">
@@ -498,7 +455,6 @@
       <tt>edge_begin</tt> to <tt>edge_end</tt>. This constructor uses extra
       memory to save the edge information before adding it to the graph,
       avoiding the requirement for the iterator to have multi-pass capability.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <hr></hr>
@@ -523,7 +479,6 @@
       numverts)</code>. The edges in <code>[edge_begin,
       edge_end)</code> do not need to be sorted. Multiple passes will be made
       over the edge range.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <p class="indent">
@@ -555,7 +510,6 @@
       of the graph, where <tt>m</tt> is distance from
       <tt>edge_begin</tt> to <tt>edge_end</tt>. Multiple passes will be made
       over the edge and property ranges.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <hr></hr>
@@ -584,9 +538,7 @@
       numverts)</code>. The edges in <code>[edge_begin,
       edge_end)</code> must be sorted so that all edges originating
       from vertex <i>i</i> preceed any edges originating from all
- vertices <i>j</i> where <i>j &gt; i</i>. <b>(The version of this
- constructor without the <tt>edges_are_sorted</tt> tag is deprecated and
- only provided by the old interface.)</b>
+ vertices <i>j</i> where <i>j &gt; i</i>.
     </p>
 
     <p class="indent">
@@ -624,9 +576,7 @@
       <tt>EdgeProperty</tt>. The iterator range <tt>[ep_iter, ep_ter +
         m)</tt> will be used to initialize the properties on the edges
       of the graph, where <tt>m</tt> is distance from
- <tt>edge_begin</tt> to <tt>edge_end</tt>. <b>(The version of this
- constructor without the <tt>edges_are_sorted</tt> tag is deprecated and
- only provided by the old interface.)</b>
+ <tt>edge_begin</tt> to <tt>edge_end</tt>.
     </p>
 
     <hr></hr>
@@ -647,7 +597,6 @@
       share storage with the constructed graph (and so are safe to destroy).
       The parameter <code>prop</code>, if provided, is used to initialize the
       graph property.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <hr></hr>
@@ -670,7 +619,6 @@
       not share storage with the constructed graph (and so are safe to
       destroy). The parameter <code>prop</code>, if provided, is used to
       initialize the graph property.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <hr></hr>
@@ -774,20 +722,6 @@
 
     <hr></hr>
 
- <a name="edge-access"></a><h3>Edge access</h3>
- <pre><a name="edge_range"></a>
- std::pair&lt;out_edge_iterator, out_edge_iterator&gt;
- edge_range(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;);
- </pre>
-
- <p class="indent">
- Returns all edges from <tt>u</tt> to <tt>v</tt>. Requires time
- logarithmic in the number of edges outgoing from <tt>u</tt>.
- <b>(This function is only provided by the old interface.)</b>
- </p>
-
- <hr></hr>
-
     <pre><a name="edge"></a>
   std::pair&lt;edge_descriptor, bool&gt;
     edge(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;);
@@ -799,9 +733,8 @@
       second value in the pair will be <tt>false</tt>. If multiple
       edges exist from <tt>u</tt> to <tt>v</tt>, the first edge will
       be returned; use edge_range
- to retrieve all edges. This function requires time logarithmic in the
- number of edges outgoing from <tt>u</tt> for the old interface, and
- linear time for the new interface.
+ to retrieve all edges. This function requires linear time in the
+ number of edges outgoing from <tt>u</tt>.
     </p>
 
     <hr></hr>
@@ -898,47 +831,6 @@
 
     <h3><a name="incremental-construction-functions">Incremental construction functions</a></h3>
 
- <pre><a name="add_vertex"></a>
-vertex_descriptor add_vertex(compressed_sparse_row_graph&amp; g)
- </pre>
-
- <p class="indent">
- Add a new vertex to the end of the graph <tt>g</tt>, and return a
- descriptor for that vertex. The new vertex will be greater than any of
- the previous vertices in <tt>g</tt>.
- <b>(This function is only provided by the old interface.)</b>
- </p>
-
- <hr></hr>
-
- <pre><a name="add_vertices"></a>
-vertex_descriptor add_vertices(vertices_size_type count, compressed_sparse_row_graph&amp; g)
- </pre>
-
- <p class="indent">
- Add <tt>count</tt> new vertices to the end of the graph <tt>g</tt>, and
- return a descriptor for the smallest new vertex. The new vertices will
- be greater than any of the previous vertices in <tt>g</tt>.
- <b>(This function is only provided by the old interface.)</b>
- </p>
-
- <hr></hr>
-
- <pre><a name="add_edge"></a>
-edge_descriptor add_edge(vertex_descriptor src, vertex_descriptor tgt, compressed_sparse_row_graph&amp; g)
- </pre>
-
- <p class="indent">
- Add a new edge from <tt>src</tt> to <tt>tgt</tt> in the graph <tt>g</tt>,
- and return a descriptor for it. There must not be an edge in <tt>g</tt>
- whose source vertex is greater than <tt>src</tt>. If the vertex
- <tt>src</tt> has out edges before this operation is called, there must be
- none whose target is larger than <tt>tgt</tt>.
- <b>(This function is only provided by the old interface.)</b>
- </p>
-
- <hr></hr>
-
     <pre><a name="add_edges"></a>
 template&lt;typename InputIterator&gt;
 void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_graph&amp; g)
@@ -951,7 +843,6 @@
       whose <code>value_type</code> is an <code>std::pair</code> of integer
       values. These integer values are the source and target vertices of the
       new edges. The edges do not need to be sorted.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <hr></hr>
@@ -972,7 +863,6 @@
       of <tt>EPIter</tt> must be the edge property type of the graph. The
       integer values produced by the <tt>InputIterator</tt> are the source and
       target vertices of the new edges. The edges do not need to be sorted.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <hr></hr>
@@ -990,7 +880,6 @@
       values. These integer values are the source and target vertices of the
       new edges. The edges must be sorted in increasing order by source vertex
       index.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <hr></hr>
@@ -1013,7 +902,6 @@
       property type of the graph.
       The edges must be sorted in increasing order by source vertex
       index.
- <b>(This function is only provided by the new interface.)</b>
     </p>
 
     <hr></hr>

Modified: trunk/libs/graph/test/csr_graph_test.cpp
==============================================================================
--- trunk/libs/graph/test/csr_graph_test.cpp (original)
+++ trunk/libs/graph/test/csr_graph_test.cpp 2009-11-24 13:38:28 EST (Tue, 24 Nov 2009)
@@ -13,9 +13,6 @@
 # undef _GLIBCXX_DEBUG
 #endif
 
-// Use new CSR interface
-#define BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 // Test for the compressed sparse row graph type
 #include <boost/graph/compressed_sparse_row_graph.hpp>
 #include <boost/graph/adjacency_list.hpp>
@@ -119,29 +116,15 @@
 template <typename Structure>
 void check_consistency_one(const Structure& g) {
   // Do a bunch of tests on the graph internal data
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- // Check that m_last_source is valid
- BOOST_CHECK(g.m_last_source <= g.m_rowstart.size() - 1);
-#endif // !BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   // Check that m_rowstart entries are valid, and that entries after
   // m_last_source + 1 are all zero
   BOOST_CHECK(g.m_rowstart[0] == 0);
   for (size_t i = 0;
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
        i < g.m_rowstart.size() - 1;
-#else // !BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- i < g.m_last_source;
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
        ++i) {
     BOOST_CHECK(g.m_rowstart[i + 1] >= g.m_rowstart[i]);
     BOOST_CHECK(g.m_rowstart[i + 1] <= g.m_rowstart.back());
   }
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- for (size_t i = g.m_last_source + 1;
- i < g.m_rowstart.size(); ++i) {
- BOOST_CHECK(g.m_forward.m_rowstart[i] == 0);
- }
-#endif // !BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   // Check that m_column entries are within range
   for (size_t i = 0; i < g.m_rowstart.back(); ++i) {
     BOOST_CHECK(g.m_column[i] < g.m_rowstart.size() - 1);
@@ -217,7 +200,6 @@
                       g3, boost::identity_property_map(),
                       boost::identity_property_map());
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   // Check constructing a graph using in-place modification of vectors
   {
     std::vector<std::size_t> sources(num_edges(g2));
@@ -287,32 +269,9 @@
                         g3a, boost::identity_property_map(),
                         boost::identity_property_map());
   }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
   CSRGraphT::edge_iterator ei, ei_end;
 
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- // Check constructing a graph using add_edge and add_vertices
- CSRGraphT g4;
- BOOST_CHECK(num_vertices(g4) == 0);
- std::size_t first_vert = add_vertices(num_vertices(g3), g4);
- BGL_FORALL_VERTICES(v, g4, CSRGraphT)
- g4[v].index = v;
-
- BOOST_CHECK(first_vert == 0);
- BOOST_CHECK(num_vertices(g4) == num_vertices(g3));
- int i;
- for (boost::tie(ei, ei_end) = edges(g3), i = 0; ei != ei_end; ++ei, ++i) {
- CSRGraphT::edge_descriptor e = add_edge(source(*ei, g3), target(*ei, g3), g4);
- BOOST_CHECK(source(e, g4) == source(*ei, g3));
- BOOST_CHECK(target(e, g4) == target(*ei, g3));
- if (i % 13 == 0) check_consistency(g4);
- }
- assert_graphs_equal(g3, boost::identity_property_map(),
- g4, boost::identity_property_map(),
- boost::identity_property_map());
-#endif // !BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
   // Check edge_from_index (and implicitly the edge_index property map) for
   // each edge in g2
   std::size_t last_src = 0, last_tgt = 0;
@@ -456,29 +415,10 @@
   // graph_test(1000, 0.1, seed);
   graph_test(1000, 0.001, seed);
   graph_test(1000, 0.0005, seed);
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- {
- std::cout << "Testing partially constructed CSR graph" << std::endl;
- CSRGraphT g;
- add_vertices(std::size_t(5), g);
- add_edge(std::size_t(1), std::size_t(2), g);
- check_consistency(g);
- add_edge(std::size_t(2), std::size_t(3), g);
- check_consistency(g);
- add_edge(std::size_t(2), std::size_t(4), g);
- check_consistency(g);
- CSRGraphT::edge_iterator ei, ei_end;
- for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) {
- BOOST_CHECK(edge_from_index(get(boost::edge_index, g, *ei), g) == *ei);
- }
- graph_test(g);
- }
-#endif // !BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
   test_graph_properties();
   test_vertex_and_edge_properties();
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   {
     std::cout << "Testing CSR graph built from unsorted edges" << std::endl;
     std::pair<int, int> unsorted_edges[] = {std::make_pair(5, 0), std::make_pair(3, 2), std::make_pair(4, 1), std::make_pair(4, 0), std::make_pair(0, 2), std::make_pair(5, 2)};
@@ -506,7 +446,6 @@
                         g3, boost::identity_property_map(),
                         boost::identity_property_map());
   }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
   return 0;
 }


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