Boost logo

Boost-Commit :

From: franklin.jonathan_at_[hidden]
Date: 2008-05-15 00:29:21


Author: jfranklin
Date: 2008-05-15 00:29:19 EDT (Thu, 15 May 2008)
New Revision: 45381
URL: http://svn.boost.org/trac/boost/changeset/45381

Log:
Changed size_t to std::size_t.

Text files modified:
   sandbox/cluster/boost/algorithm/cluster/cluster_data.hpp | 2 +-
   sandbox/cluster/boost/algorithm/cluster/dbscan.hpp | 8 ++++----
   sandbox/cluster/boost/algorithm/cluster/k_means.hpp | 6 +++---
   3 files changed, 8 insertions(+), 8 deletions(-)

Modified: sandbox/cluster/boost/algorithm/cluster/cluster_data.hpp
==============================================================================
--- sandbox/cluster/boost/algorithm/cluster/cluster_data.hpp (original)
+++ sandbox/cluster/boost/algorithm/cluster/cluster_data.hpp 2008-05-15 00:29:19 EDT (Thu, 15 May 2008)
@@ -52,7 +52,7 @@
   value_type & back() { return m_pClusters->back(); }
   value_type const & back() const { return m_pClusters->back(); }
 
- size_t size() const { return m_pClusters->size(); }
+ std::size_t size() const { return m_pClusters->size(); }
   bool empty() const { return m_pClusters->empty(); }
 
 private:

Modified: sandbox/cluster/boost/algorithm/cluster/dbscan.hpp
==============================================================================
--- sandbox/cluster/boost/algorithm/cluster/dbscan.hpp (original)
+++ sandbox/cluster/boost/algorithm/cluster/dbscan.hpp 2008-05-15 00:29:19 EDT (Thu, 15 May 2008)
@@ -52,7 +52,7 @@
 dbscan(NTupleIterT const & begin,
        NTupleIterT const & end,
        DistanceT const & eps,
- size_t min_points,
+ std::size_t min_points,
        DistFunT const & d)
 {
   // Concept check.
@@ -68,7 +68,7 @@
   ntuple_nodes tuples;
 
   // Initialize algorithm.
- //size_t num_elems = 0;
+ //std::size_t num_elems = 0;
   for(NTupleIterT it = begin; it != end; ++it)
   {
     //++num_elems;
@@ -106,7 +106,7 @@
     // Mark entire neighborhood as part of the current cluster.
     it->cluster = cluster_num;
     cur_cluster.push_back(it->tuple);
- for (size_t n = 0; n < seeds.size(); ++n)
+ for (std::size_t n = 0; n < seeds.size(); ++n)
     {
       seeds[n]->cluster = cluster_num;
       cur_cluster.push_back(seeds[n]->tuple);
@@ -124,7 +124,7 @@
 
       if (results.size() >= min_points)
       {
- for (size_t n = 0; n < results.size(); ++n)
+ for (std::size_t n = 0; n < results.size(); ++n)
         {
           if (results[n]->cluster < 1) // Not assigned to cluster yet.
           {

Modified: sandbox/cluster/boost/algorithm/cluster/k_means.hpp
==============================================================================
--- sandbox/cluster/boost/algorithm/cluster/k_means.hpp (original)
+++ sandbox/cluster/boost/algorithm/cluster/k_means.hpp 2008-05-15 00:29:19 EDT (Thu, 15 May 2008)
@@ -136,12 +136,12 @@
                 typedef NTupleIter::value_type PointType;
                 typedef PointType::value_type AttributeType; //For the c funtion test, it will be a double type
                 const DistanceType knumOfPoints = last - first; //The n variable in the C function
- const size_t knDimension = PointType::size(); //The m variable in the C function
+ const std::size_t knDimension = PointType::size(); //The m variable in the C function
 
                 AttributeType** ppData = new AttributeType* [knumOfPoints];
                 AttributeType** centroids = new AttributeType* [k];
                 //Pre-allocate the result array
- for(size_t nCentroid = 0; nCentroid < k; nCentroid++)
+ for(std::size_t nCentroid = 0; nCentroid < k; nCentroid++)
                 {
                     centroids[nCentroid] = new AttributeType[knDimension];
                 }
@@ -161,7 +161,7 @@
 
                 typedef KMeansCluster<PointType> KMeansClusterType;
                 KMeansClustering< KMeansClusterType > clustering;
- for(size_t nCentroid = 0; nCentroid < k; nCentroid++)
+ for(std::size_t nCentroid = 0; nCentroid < k; nCentroid++)
                 {
                     
                     KMeansClusterType cluster;


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