Boost logo

Boost-Commit :

From: asutton_at_[hidden]
Date: 2007-08-13 13:06:16


Author: asutton
Date: 2007-08-13 13:06:14 EDT (Mon, 13 Aug 2007)
New Revision: 38625
URL: http://svn.boost.org/trac/boost/changeset/38625

Log:
Renamed template argument from matrix to matrix map

Text files modified:
   sandbox/SOC/2007/graphs/boost/graph/closeness_centrality.hpp | 29 ++++++++++++++---------------
   1 files changed, 14 insertions(+), 15 deletions(-)

Modified: sandbox/SOC/2007/graphs/boost/graph/closeness_centrality.hpp
==============================================================================
--- sandbox/SOC/2007/graphs/boost/graph/closeness_centrality.hpp (original)
+++ sandbox/SOC/2007/graphs/boost/graph/closeness_centrality.hpp 2007-08-13 13:06:14 EDT (Mon, 13 Aug 2007)
@@ -12,11 +12,10 @@
 
 namespace boost
 {
- template <
- typename Graph,
- typename DistanceType,
- typename ResultType,
- typename Reciprocal = detail::reciprocal<ResultType>
+ template <typename Graph,
+ typename DistanceType,
+ typename ResultType,
+ typename Reciprocal = detail::reciprocal<ResultType>
>
     struct closeness_measure
         : public geodesic_measure<Graph, DistanceType, ResultType>
@@ -30,11 +29,11 @@
             function_requires< NumericValueConcept<DistanceType> >();
             function_requires< NumericValueConcept<ResultType> >();
             function_requires< AdaptableUnaryFunctionConcept<Reciprocal,ResultType,ResultType> >();
- Reciprocal r;
             return
                 (d == base_type::infinite_distance()) ?
- base_type::zero_result() : r(result_type(d));
+ base_type::zero_result() : rec(result_type(d));
         }
+ Reciprocal rec;
     };
 
     template <typename Graph, typename DistanceMap>
@@ -129,19 +128,19 @@
     }
 
     template <typename Graph,
- typename DistanceMatrix,
+ typename DistanceMatrixMap,
               typename CentralityMap,
               typename Measure>
     inline void
     closeness_centrality(const Graph& g,
- const DistanceMatrix& dist,
+ const DistanceMatrixMap& dist,
                          CentralityMap cent,
                          Measure measure)
     {
         function_requires< VertexListGraphConcept<Graph> >();
         typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
- function_requires< ReadablePropertyMapConcept<DistanceMatrix,Vertex> >();
- typedef typename property_traits<DistanceMatrix>::value_type DistanceMap;
+ function_requires< ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> >();
+ typedef typename property_traits<DistanceMatrixMap>::value_type DistanceMap;
         function_requires< ReadablePropertyMapConcept<DistanceMap,Vertex> >();
         function_requires< WritablePropertyMapConcept<CentralityMap,Vertex> >();
         typedef typename property_traits<DistanceMap>::value_type Distance;
@@ -156,17 +155,17 @@
     }
 
     template <typename Graph,
- typename DistanceMatrix,
+ typename DistanceMatrixMap,
               typename CentralityMap>
     inline void
     closeness_centrality(const Graph& g,
- const DistanceMatrix& dist,
+ const DistanceMatrixMap& dist,
                          CentralityMap cent)
     {
         function_requires< GraphConcept<Graph> >();
         typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
- function_requires< ReadablePropertyMapConcept<DistanceMatrix,Vertex> >();
- typedef typename property_traits<DistanceMatrix>::value_type DistanceMap;
+ function_requires< ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> >();
+ typedef typename property_traits<DistanceMatrixMap>::value_type DistanceMap;
         function_requires< ReadablePropertyMapConcept<DistanceMap,Vertex> >();
         typedef typename property_traits<DistanceMap>::value_type Distance;
         typedef typename property_traits<CentralityMap>::value_type Result;


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