|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54596 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2009-07-02 16:17:27
Author: jewillco
Date: 2009-07-02 16:17:27 EDT (Thu, 02 Jul 2009)
New Revision: 54596
URL: http://svn.boost.org/trac/boost/changeset/54596
Log:
Added customizable source data type; refs #3134
Text files modified:
trunk/boost/graph/compressed_sparse_row_graph.hpp | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 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-07-02 16:17:27 EDT (Thu, 02 Jul 2009)
@@ -642,8 +642,9 @@
// From number of vertices and mutable vectors of sources and targets;
// vectors are returned with unspecified contents but are guaranteed not to
// share storage with the constructed graph.
+ template <typename Source>
compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_t,
- std::vector<vertex_descriptor>& sources,
+ std::vector<Source>& sources,
std::vector<vertex_descriptor>& targets,
vertices_size_type numverts,
const GraphProperty& prop = GraphProperty())
@@ -658,9 +659,9 @@
// unspecified contents but are guaranteed not to share storage with the
// constructed graph. This constructor should only be used by the
// distributed CSR graph.
- template <typename GlobalToLocal>
+ template <typename GlobalToLocal, typename Source>
compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_global_t,
- std::vector<vertex_descriptor>& sources,
+ std::vector<Source>& sources,
std::vector<vertex_descriptor>& targets,
vertices_size_type numlocalverts,
GlobalToLocal global_to_local,
@@ -674,8 +675,9 @@
// From number of vertices and mutable vectors of sources, targets, and edge
// properties; vectors are returned with unspecified contents but are
// guaranteed not to share storage with the constructed graph.
+ template <typename Source>
compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_t,
- std::vector<vertex_descriptor>& sources,
+ std::vector<Source>& sources,
std::vector<vertex_descriptor>& targets,
std::vector<typename inherited_edge_properties::edge_bundled>& edge_props,
vertices_size_type numverts,
@@ -691,9 +693,9 @@
// returned with unspecified contents but are guaranteed not to share
// storage with the constructed graph. This constructor should only be used
// by the distributed CSR graph.
- template <typename GlobalToLocal>
+ template <typename GlobalToLocal, typename Source>
compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_global_t,
- std::vector<vertex_descriptor>& sources,
+ std::vector<Source>& sources,
std::vector<vertex_descriptor>& targets,
std::vector<typename inherited_edge_properties::edge_bundled>& edge_props,
vertices_size_type numlocalverts,
@@ -808,8 +810,8 @@
// Replace graph with sources and targets given, sorting them in-place, and
// using the given global-to-local property map to get local indices from
// global ones in the two arrays.
- template <typename GlobalToLocal>
- void assign_sources_and_targets_global(std::vector<vertex_descriptor>& sources,
+ template <typename GlobalToLocal, typename Source>
+ void assign_sources_and_targets_global(std::vector<Source>& sources,
std::vector<vertex_descriptor>& targets,
vertices_size_type numverts,
GlobalToLocal global_to_local) {
@@ -867,8 +869,8 @@
// Replace graph with sources and targets and edge properties given, sorting
// them in-place, and using the given global-to-local property map to get
// local indices from global ones in the two arrays.
- template <typename GlobalToLocal>
- void assign_sources_and_targets_global(std::vector<vertex_descriptor>& sources,
+ template <typename GlobalToLocal, typename Source>
+ void assign_sources_and_targets_global(std::vector<Source>& sources,
std::vector<vertex_descriptor>& targets,
std::vector<typename inherited_edge_properties::edge_bundled>& edge_props,
vertices_size_type numverts,
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