Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59498 - sandbox/statistics/functional/boost/functional
From: erwann.rogard_at_[hidden]
Date: 2010-02-04 19:46:04


Author: e_r
Date: 2010-02-04 19:46:04 EST (Thu, 04 Feb 2010)
New Revision: 59498
URL: http://svn.boost.org/trac/boost/changeset/59498

Log:
del
Removed:
   sandbox/statistics/functional/boost/functional/clock.hpp
   sandbox/statistics/functional/boost/functional/mean_var_accumulator.hpp
   sandbox/statistics/functional/boost/functional/visitor.hpp

Deleted: sandbox/statistics/functional/boost/functional/clock.hpp
==============================================================================
--- sandbox/statistics/functional/boost/functional/clock.hpp 2010-02-04 19:46:04 EST (Thu, 04 Feb 2010)
+++ (empty file)
@@ -1,88 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// boost::functional::clock.hpp //
-// //
-// Copyright 2009 Erwann Rogard. Distributed under 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) //
-///////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_FUNCTIONAL_CLOCK_HPP_ER_2009
-#define BOOST_FUNCTIONAL_CLOCK_HPP_ER_2009
-#include <iostream>
-
-namespace boost{
-namespace functional{
-
- // Models Generator
- //
- // This clock generates equally spaced times
- template<typename T>
- struct clock{
- public:
- clock();
- clock(const T& start_time,const T& delta_time);
- clock(const clock&);
- clock& operator=(const clock&);
-
- typedef T result_type;
-
- result_type operator()();
-
- template<typename T1>
- friend std::istream& operator>>(std::istream& is, clock<T1>& c);
-
- private:
- T start_time_;
- T delta_time_;
- };
-
- template<typename T>
- std::ostream& operator<<(std::ostream& os, const clock<T>& c);
-
- // Implementation //
-
- template<typename T>
- std::ostream& operator<<(std::ostream& out,const clock<T>& c){
- out << '(' << c.start_time_ << ',' << c.delta_time_ << ')';
- return out;
- }
-
- template<typename T>
- std::istream& operator>>(std::istream& is, clock<T>& c){
- is >> std::ws >> c.start_time_ >> std::ws >> c.delta_time_ >> std::ws;
- return is;
- }
-
- template<typename T>
- clock<T>::clock()
- :start_time_(static_cast<T>(0)),delta_time_(static_cast<T>(0)){}
-
- template<typename T>
- clock<T>::clock(const T& start_time,const T& delta_time)
- :start_time_(start_time),delta_time_(delta_time){}
-
- template<typename T>
- clock<T>::clock(const clock& that)
- :start_time_(that.start_time_),delta_time_(that.delta_time_){}
-
- template<typename T>
- clock<T>&
- clock<T>::operator=(const clock& that){
- if(&that!=this){
- start_time_ = (that.start_time_);
- delta_time_ = (that.delta_time_);
- }
- return *this;
- }
-
- template<typename T>
- typename clock<T>::result_type
- clock<T>::operator()(){
- result_type res = start_time_;
- start_time_ += delta_time_;
- return res;
- }
-
-}// functional
-}// boost
-
-#endif
\ No newline at end of file

Deleted: sandbox/statistics/functional/boost/functional/mean_var_accumulator.hpp
==============================================================================
--- sandbox/statistics/functional/boost/functional/mean_var_accumulator.hpp 2010-02-04 19:46:04 EST (Thu, 04 Feb 2010)
+++ (empty file)
@@ -1,31 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// functional::mean_var_accumulator.hpp //
-// //
-// Copyright 2009 Erwann Rogard. Distributed under 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) //
-///////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_FUNCTIONAL_MEAN_VAR_ACCUMULATOR_HPP_ER_2009
-#define BOOST_FUNCTIONAL_MEAN_VAR_ACCUMULATOR_HPP_ER_2009
-#include <boost/accumulators/accumulators.hpp>
-#include <boost/accumulators/statistics/mean.hpp>
-#include <boost/accumulators/statistics/variance.hpp>
-#include <boost/accumulators/statistics/stats.hpp>
-
-namespace boost{
-namespace functional{
-
- // This comes up often, so this metafunction saves a bit of time
- template<typename T>
- struct mean_var_accumulator{
- typedef accumulators::stats<
- accumulators::tag::mean,
- accumulators::tag::variance
- > stat_;
- typedef accumulators::accumulator_set<T,stat_> type;
- };
-
-}// meta
-}// boost
-
-#endif

Deleted: sandbox/statistics/functional/boost/functional/visitor.hpp
==============================================================================
--- sandbox/statistics/functional/boost/functional/visitor.hpp 2010-02-04 19:46:04 EST (Thu, 04 Feb 2010)
+++ (empty file)
@@ -1,95 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// boost::functional::visitor.hpp //
-// //
-// Copyright 2009 Erwann Rogard. Distributed under 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) //
-///////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_FUNCTIONAL_VISITOR_HPP_ER_2009
-#define BOOST_FUNCTIONAL_VISITOR_HPP_ER_2009
-#include <iterator>
-#include <boost/range.hpp>
-#include <boost/utility.hpp>
-
-namespace boost{
-namespace functional{
-
- // Models Generator
- //
- // Successively returns elements of a range
- template<typename R>
- class visitor{
- typedef typename range_iterator<R>::type it_t;
- typedef std::size_t size_type;
-
- public:
- visitor();
- visitor(const R& r);
- visitor(const visitor&);
- visitor& operator=(const visitor&);
-
- typedef typename range_value<R>::type result_type;
-
- result_type operator()();
-
- void reset(size_type n);
-
- private:
- R r_;
- it_t it_;
- };
-
- // Implementation //
-
- template<typename R>
- visitor<R>::visitor(){}
-
- template<typename R>
- void visitor<R>::reset(size_type n){
- this->it_ = boost::next(
- boost::begin(this->r_),
- n
- );
- }
-
- template<typename R>
- visitor<R>::visitor(const R& r)
- :r_(r){ this-> reset(0); }
-
- template<typename R>
- visitor<R>::visitor(const visitor& that)
- :r_(that.r_){
- this->reset(
- std::distance(
- boost::begin(that.r_),
- that.it_
- )
- );
- }
-
- template<typename R>
- visitor<R>&
- visitor<R>::operator=(const visitor& that){
- if(&that!=this){
- this->r_ = that.r_;
- this->reset(
- std::distance(
- boost::begin(that.r_),
- that.it_
- )
- );
- }
- return *this;
- }
-
- template<typename R>
- typename visitor<R>::result_type
- visitor<R>::operator()(){
- typedef typename visitor<R>::result_type x_;
- return *(this->it_++);
- }
-
-}// functional
-}// boost
-
-#endif
\ No newline at end of file


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