Boost logo

Boost-Commit :

From: sundman.anders_at_[hidden]
Date: 2008-05-24 15:52:46


Author: asundman
Date: 2008-05-24 15:52:45 EDT (Sat, 24 May 2008)
New Revision: 45737
URL: http://svn.boost.org/trac/boost/changeset/45737

Log:
Renamed dist_func.hpp to dist_fun.hpp
Added:
   sandbox/cluster/boost/algorithm/cluster/dist_fun.hpp
      - copied, changed from r45736, /sandbox/cluster/boost/algorithm/cluster/dist_func.hpp
Removed:
   sandbox/cluster/boost/algorithm/cluster/dist_func.hpp
Text files modified:
   sandbox/cluster/boost/algorithm/cluster/dist_fun.hpp | 4 ++--
   sandbox/cluster/libs/algorithm/cluster/src/dbscan.cpp | 2 +-
   sandbox/cluster/libs/algorithm/cluster/src/dfunctest.cpp | 2 +-
   sandbox/cluster/libs/algorithm/cluster/src/unittests.cpp | 2 +-
   4 files changed, 5 insertions(+), 5 deletions(-)

Copied: sandbox/cluster/boost/algorithm/cluster/dist_fun.hpp (from r45736, /sandbox/cluster/boost/algorithm/cluster/dist_func.hpp)
==============================================================================
--- /sandbox/cluster/boost/algorithm/cluster/dist_func.hpp (original)
+++ sandbox/cluster/boost/algorithm/cluster/dist_fun.hpp 2008-05-24 15:52:45 EDT (Sat, 24 May 2008)
@@ -1,5 +1,5 @@
-#ifndef BOOST_ALGORITHM_CLUSTER_DIST_FUNC_HPP
-#define BOOST_ALGORITHM_CLUSTER_DIST_FUNC_HPP
+#ifndef BOOST_ALGORITHM_CLUSTER_DIST_FUN_HPP
+#define BOOST_ALGORITHM_CLUSTER_DIST_FUN_HPP
 
 // (C) Copyright Anders Sundman 2008.
 // Use, modification and distribution are subject to the

Deleted: sandbox/cluster/boost/algorithm/cluster/dist_func.hpp
==============================================================================
--- sandbox/cluster/boost/algorithm/cluster/dist_func.hpp 2008-05-24 15:52:45 EDT (Sat, 24 May 2008)
+++ (empty file)
@@ -1,91 +0,0 @@
-#ifndef BOOST_ALGORITHM_CLUSTER_DIST_FUNC_HPP
-#define BOOST_ALGORITHM_CLUSTER_DIST_FUNC_HPP
-
-// (C) Copyright Anders Sundman 2008.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <functional>
-#include <cmath>
-
-#include "boost/fusion/adapted.hpp"
-#include "boost/fusion/algorithm.hpp"
-#include "boost/lambda/lambda.hpp"
-#include "boost/bind.hpp"
-
-// This file is currently required to get Fusion and Lambda to
-// work together.
-#include "detail/lambda_result_of.hpp"
-
-
-namespace boost { namespace algorithm { namespace cluster {
-
-template<typename T1, typename T2>
-double euclid_dist( const T1 & t1, const T2 & t2)
-{
- return std::sqrt
- (
- boost::fusion::fold
- (
- boost::fusion::transform
- (
- boost::fusion::transform
- (
- t1, t2, std::minus<double>()
- ),
- boost::bind(std::multiplies<double>(), _1, _1)
- ),
- 0, std::plus<double>()
- )
- );
-}
-
-template<typename T1, typename T2>
-double euclid_dist_pretty( const T1 & t1, const T2 & t2)
-{
- using namespace boost::lambda;
- return std::sqrt
- (
- static_cast<double>(
- boost::fusion::fold
- (
- boost::fusion::transform
- (
- t1, t2, (_1 * _1)(_1 - _2)
- ),
- 0, _1 + _2
- )
- )
- );
-}
-
-namespace impl {
- template<typename T>
- struct absdiff : std::binary_function<T, T, T>
- {
- T operator ()(const T & t1, const T & t2) const
- {
- return t1 < t2 ? t2 - t1 : t1 - t2;
- }
- };
-}
-
-template<typename T1, typename T2>
-double manhattan_dist( const T1 & t1, const T2 & t2)
-{
- using namespace boost::lambda;
-
- return boost::fusion::fold
- (
- boost::fusion::transform
- (
- t1, t2, impl::absdiff<double>()
- ),
- 0, _1 + _2
- );
-}
-
-}}}
-
-#endif

Modified: sandbox/cluster/libs/algorithm/cluster/src/dbscan.cpp
==============================================================================
--- sandbox/cluster/libs/algorithm/cluster/src/dbscan.cpp (original)
+++ sandbox/cluster/libs/algorithm/cluster/src/dbscan.cpp 2008-05-24 15:52:45 EDT (Sat, 24 May 2008)
@@ -1,5 +1,5 @@
 #include <boost/algorithm/cluster/dbscan.hpp>
-#include <boost/algorithm/cluster/dist_func.hpp>
+#include <boost/algorithm/cluster/dist_fun.hpp>
 #include <boost/test/minimal.hpp>
 #include <vector>
 #include <cmath>

Modified: sandbox/cluster/libs/algorithm/cluster/src/dfunctest.cpp
==============================================================================
--- sandbox/cluster/libs/algorithm/cluster/src/dfunctest.cpp (original)
+++ sandbox/cluster/libs/algorithm/cluster/src/dfunctest.cpp 2008-05-24 15:52:45 EDT (Sat, 24 May 2008)
@@ -1,4 +1,4 @@
-#include "boost/algorithm/cluster/dist_func.hpp"
+#include "boost/algorithm/cluster/dist_fun.hpp"
 #include "boost/date_time/posix_time/posix_time.hpp"
 
 #define ITER 500000

Modified: sandbox/cluster/libs/algorithm/cluster/src/unittests.cpp
==============================================================================
--- sandbox/cluster/libs/algorithm/cluster/src/unittests.cpp (original)
+++ sandbox/cluster/libs/algorithm/cluster/src/unittests.cpp 2008-05-24 15:52:45 EDT (Sat, 24 May 2008)
@@ -1,5 +1,5 @@
 #include <boost/algorithm/cluster/dbscan.hpp>
-#include <boost/algorithm/cluster/dist_func.hpp>
+#include <boost/algorithm/cluster/dist_fun.hpp>
 
 #include <boost/test/minimal.hpp>
 #include <vector>


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