$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r59101 - sandbox/statistics/random/libs/random/example
From: erwann.rogard_at_[hidden]
Date: 2010-01-17 16:10:23
Author: e_r
Date: 2010-01-17 16:10:22 EST (Sun, 17 Jan 2010)
New Revision: 59101
URL: http://svn.boost.org/trac/boost/changeset/59101
Log:
delete
Removed:
   sandbox/statistics/random/libs/random/example/categorical.cpp
   sandbox/statistics/random/libs/random/example/categorical.h
Deleted: sandbox/statistics/random/libs/random/example/categorical.cpp
==============================================================================
--- sandbox/statistics/random/libs/random/example/categorical.cpp	2010-01-17 16:10:22 EST (Sun, 17 Jan 2010)
+++ (empty file)
@@ -1,80 +0,0 @@
-#include <algorithm>
-#include <boost/timer.hpp>
-#include <boost/random/mersenne_twister.hpp>
-#include <boost/random/chi_squared.hpp>
-#include <boost/random/variate_generator.hpp>
-#include <boost/random/categorical_distribution.hpp>
-#include <boost/random/discrete_distribution_sw_2009.hpp>
-#include <boost/binary_op/algorithm/sort_on_head.hpp>
-
-void example_categorical(std::ostream& out){
-
-    using namespace boost;
-    typedef double              val_;
-    typedef std::vector<val_>   vals_;
-
-    typedef mt19937                                             urng_;
-    typedef boost::random::chi_squared_distribution<val_>       rdist_;
-    typedef boost::variate_generator<urng_&,rdist_>             vg_;
-    typedef boost::random::categorical_distribution<>           cat_dist_;
-    typedef range_size<vals_>::type                             size_;
-    typedef boost::random::discrete_distribution<
-        cat_dist_::result_type,
-        val_
-    > discr_dist_;
-    
-    const val_ df = 4.0;
-    const size_ n = 1e4;
-    const size_ m = 1e5;
-    
-    vals_ weights; weights.reserve(n);
-    vals_ values(n);
-    urng_ urng;
-    rdist_ rdist( df );
-    vg_ vg( urng, rdist);
-    std::generate_n(
-        std::back_inserter(weights),
-        n,
-        vg
-    );
-    vals_ sorted_weights = weights;
-
-    timer t;
- 
-    out << ( format("--initialize, n = %1%")%n ).str() << std::endl;   
-    out << "categorical : ";
-    t.restart();
-    binary_op::sort_on_head_greater(
-        boost::begin(sorted_weights),
-        boost::end(sorted_weights),
-        boost::begin(values)
-    );
-    cat_dist_ cat_dist(sorted_weights);
-    out << (format("t = %1%")%t.elapsed()).str();
-
-    t.restart();
-    out << std::endl << "discrete : ";
-    discr_dist_ discr(
-        boost::begin(weights),
-        boost::end(weights)
-    );
-    out << (format("t = %1%")%t.elapsed()).str();
-
-    out << std::endl << ( format("--sample, m = %1%")%m ).str() << std::endl;   
-    out << "categorical : ";
-    t.restart();
-    for(unsigned i = 0; i<m; i++){
-        cat_dist(urng);
-    }
-    out << (format("t = %1%")%t.elapsed()).str();
- 
-    out << std::endl << "discrete : ";
-    t.restart();
-    for(unsigned i = 0; i<m; i++){
-        discr(urng);
-    }
-    out << (format("t = %1%")%t.elapsed()).str();
-
-}
-
-
Deleted: sandbox/statistics/random/libs/random/example/categorical.h
==============================================================================
--- sandbox/statistics/random/libs/random/example/categorical.h	2010-01-17 16:10:22 EST (Sun, 17 Jan 2010)
+++ (empty file)
@@ -1,17 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// random::students_t_distribution.hpp                                      //
-//                                                                          //
-//                                                                          //
-//  (C) Copyright 2009 Erwann Rogard                                        //
-//  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)        //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef LIBS_RANDOM_EXAMPLE_CATEGORICAL_HPP_ER_2009
-#define LIBS_RANDOM_EXAMPLE_CATEGORICAL_HPP_ER_2009
-#include <iostream>
-    
-void example_categorical(std::ostream& out);
-
-#endif
-