|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83877 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2013-04-13 14:20:16
Author: jewillco
Date: 2013-04-13 14:20:16 EDT (Sat, 13 Apr 2013)
New Revision: 83877
URL: http://svn.boost.org/trac/boost/changeset/83877
Log:
Fixed 32/64-bit size issues; fixes #8434
Text files modified:
trunk/boost/graph/sloan_ordering.hpp | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
Modified: trunk/boost/graph/sloan_ordering.hpp
==============================================================================
--- trunk/boost/graph/sloan_ordering.hpp (original)
+++ trunk/boost/graph/sloan_ordering.hpp 2013-04-13 14:20:16 EDT (Sat, 13 Apr 2013)
@@ -46,9 +46,9 @@
//
/////////////////////////////////////////////////////////////////////////
template<class Distance>
- unsigned RLS_depth(Distance& d)
+ typename Distance::value_type RLS_depth(Distance& d)
{
- unsigned h_s = 0;
+ typename Distance::value_type h_s = 0;
typename Distance::iterator iter;
for (iter = d.begin(); iter != d.end(); ++iter)
@@ -70,14 +70,16 @@
//
/////////////////////////////////////////////////////////////////////////
template<class Distance, class my_int>
- unsigned RLS_max_width(Distance& d, my_int depth)
+ typename Distance::value_type RLS_max_width(Distance& d, my_int depth)
{
+
+ typedef typename Distance::value_type Degree;
//Searching for the maximum width of a level
- std::vector<unsigned> dummy_width(depth+1, 0);
- std::vector<unsigned>::iterator my_it;
+ std::vector<Degree> dummy_width(depth+1, 0);
+ typename std::vector<Degree>::iterator my_it;
typename Distance::iterator iter;
- unsigned w_max = 0;
+ Degree w_max = 0;
for (iter = d.begin(); iter != d.end(); ++iter)
{
@@ -117,10 +119,10 @@
s = *(vertices(G).first);
Vertex e = s;
Vertex i;
- unsigned my_degree = get(degree, s );
- unsigned dummy, h_i, h_s, w_i, w_e;
+ Degree my_degree = get(degree, s );
+ Degree dummy, h_i, h_s, w_i, w_e;
bool new_start = true;
- unsigned maximum_degree = 0;
+ Degree maximum_degree = 0;
//Creating a std-vector for storing the distance from the start vertex in dist
std::vector<typename graph_traits<Graph>::vertices_size_type> dist(num_vertices(G), 0);
@@ -196,7 +198,7 @@
// step 5
// Initializing w
- w_e = (std::numeric_limits<unsigned>::max)();
+ w_e = (std::numeric_limits<Degree>::max)();
//end 5
@@ -290,7 +292,7 @@
typename property_map<Graph, vertex_index_t>::type index_map = get(vertex_index, g);
//Sets the color and priority to their initial status
- unsigned cdeg;
+ Degree cdeg;
typename graph_traits<Graph>::vertex_iterator ui, ui_end;
for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui)
{
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