Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55850 - in sandbox/statistics/estimator_concept: . boost boost/statistics boost/statistics/estimator_concept boost/statistics/estimator_concept/estimator boost/statistics/estimator_concept/meta boost/statistics/estimator_concept/trainable boost/statistics/estimator_concept/trainable_estimator libs libs/statistics libs/statistics/estimator_concept libs/statistics/estimator_concept/doc libs/statistics/estimator_concept/example libs/statistics/estimator_concept/src
From: erwann.rogard_at_[hidden]
Date: 2009-08-28 20:00:10


Author: e_r
Date: 2009-08-28 20:00:09 EDT (Fri, 28 Aug 2009)
New Revision: 55850
URL: http://svn.boost.org/trac/boost/changeset/55850

Log:
adding dir
Added:
   sandbox/statistics/estimator_concept/
   sandbox/statistics/estimator_concept/boost/
   sandbox/statistics/estimator_concept/boost/statistics/
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/estimator/
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/estimator/concept.hpp (contents, props changed)
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/meta/
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/meta/estimate_input.hpp (contents, props changed)
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/meta/result_of_estimate.hpp (contents, props changed)
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/trainable/
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/trainable/concept.hpp (contents, props changed)
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/trainable_estimator/
   sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/trainable_estimator/concept.hpp (contents, props changed)
   sandbox/statistics/estimator_concept/libs/
   sandbox/statistics/estimator_concept/libs/statistics/
   sandbox/statistics/estimator_concept/libs/statistics/estimator_concept/
   sandbox/statistics/estimator_concept/libs/statistics/estimator_concept/doc/
   sandbox/statistics/estimator_concept/libs/statistics/estimator_concept/doc/readme.txt (contents, props changed)
   sandbox/statistics/estimator_concept/libs/statistics/estimator_concept/example/
   sandbox/statistics/estimator_concept/libs/statistics/estimator_concept/src/

Added: sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/estimator/concept.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/estimator/concept.hpp 2009-08-28 20:00:09 EDT (Fri, 28 Aug 2009)
@@ -0,0 +1,41 @@
+//////////////////////////////////////////////////////////////////////////////
+// statistics::estimator_concept::estimator::concept.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 BOOST_STATISTICS_ESTIMATOR_CONCEPT_ESTIMATOR_CONCEPT_HPP_ER_2009
+#define BOOST_STATISTICS_ESTIMATOR_CONCEPT_ESTIMATOR_CONCEPT_HPP_ER_2009
+#include <boost/concept_check.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/mpl/empty_base.hpp>
+#include <boost/statistics/estimator_concept/trainable/concept.hpp>
+
+namespace boost{
+namespace statistics{
+namespace estimator_concept{
+
+ // E is the estimator type
+ // X the type of the covariate
+ template <typename E,typename X, typename B = mpl::empty_base>
+ class Estimator : B
+ {
+ public:
+
+ BOOST_CONCEPT_USAGE(Estimator)
+ {
+ estimate( e, x );
+ }
+
+ private:
+ E e;
+ X x;
+ };
+
+}// estimator_concept
+}// statistics
+}// boost
+
+#endif
\ No newline at end of file

Added: sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/meta/estimate_input.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/meta/estimate_input.hpp 2009-08-28 20:00:09 EDT (Fri, 28 Aug 2009)
@@ -0,0 +1,31 @@
+//////////////////////////////////////////////////////////////////////////////
+// statistics::estimator_concept::meta::estimate_input.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 BOOST_STATISTICS_ESTIMATOR_CONCEPT_META_ESTIMATE_INPUT_HPP_ER_2009
+#define BOOST_STATISTICS_ESTIMATOR_CONCEPT_META_ESTIMATE_INPUT_HPP_ER_2009
+#include <boost/tuple/tuple.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/binary_op/meta/is_tuple.hpp>
+
+namespace boost{
+namespace statistics{
+namespace estimator_concept{
+
+template <typename T>
+struct estimate_input : mpl::eval_if<
+ binary_op::is_tuple<T>, // T = (X,Y)
+ boost::tuples::element<0,T>, // X
+ mpl::identity<T>
+>{};
+
+}// estimator_concept
+}// statistics
+}// boost
+
+#endif
\ No newline at end of file

Added: sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/meta/result_of_estimate.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/meta/result_of_estimate.hpp 2009-08-28 20:00:09 EDT (Fri, 28 Aug 2009)
@@ -0,0 +1,22 @@
+//////////////////////////////////////////////////////////////////////////////
+// statistics::estimator_concept::meta::result_of_estimate.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 BOOST_STATISTICS_ESTIMATOR_CONCEPT_META_RESULT_OF_ESTIMATE_HPP_ER_2009
+#define BOOST_STATISTICS_ESTIMATOR_CONCEPT_META_RESULT_OF_ESTIMATE_HPP_ER_2009
+#include <boost/tuple/tuple.hpp>
+#include <boost/mpl/empty_base.hpp>
+
+namespace boost{
+namespace statistics{
+
+ template<typename E,typename X> struct result_of_estimate{};
+
+}// statistics
+}// boost
+
+#endif

Added: sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/trainable/concept.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/trainable/concept.hpp 2009-08-28 20:00:09 EDT (Fri, 28 Aug 2009)
@@ -0,0 +1,38 @@
+//////////////////////////////////////////////////////////////////////////////
+// statistics::estimator_concept::trainable::concept.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 BOOST_STATISTICS_ESTIMATOR_CONCEPT_TRAINABLE_CONCEPT_HPP_ER_2009
+#define BOOST_STATISTICS_ESTIMATOR_CONCEPT_TRAINABLE_CONCEPT_HPP_ER_2009
+#include <boost/concept_check.hpp>
+#include <boost/mpl/empty_base.hpp>
+
+namespace boost{
+namespace statistics{
+namespace estimator_concept{
+
+ // E : estimator type
+ // Rxy : sequence of (X,Y) pairs
+ template <typename E,typename Rxy,typename B = mpl::empty_base>
+ class Trainable : B
+ {
+ public:
+ BOOST_CONCEPT_USAGE(Trainable)
+ {
+ train( e, r_xy );
+ }
+
+ private:
+ E e;
+ Rxy r_xy;
+ };
+
+}// estimator_concept
+}// statistics
+}// boost
+
+#endif
\ No newline at end of file

Added: sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/trainable_estimator/concept.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/estimator_concept/boost/statistics/estimator_concept/trainable_estimator/concept.hpp 2009-08-28 20:00:09 EDT (Fri, 28 Aug 2009)
@@ -0,0 +1,41 @@
+//////////////////////////////////////////////////////////////////////////////
+// statistics::estimator_concept::trainable_estimator::concept.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 BOOST_STATISTICS_ESTIMATOR_CONCEPT_TRAINABLE_ESTIMATOR_CONCEPT_HPP_ER_2009
+#define BOOST_STATISTICS_ESTIMATOR_CONCEPT_TRAINABLE_ESTIMATOR_CONCEPT_HPP_ER_2009
+#include <boost/concept_check.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/mpl/empty_base.hpp>
+#include <boost/statistics/estimator_concept/trainable/concept.hpp>
+#include <boost/statistics/estimator_concept/estimator/concept.hpp>
+#include <boost/statistics/estimator_concept/trainable_estimator/meta_input.hpp>
+
+namespace boost{
+namespace statistics{
+namespace estimator_concept{
+
+// X
+template <
+ typename E,
+ typename R,
+ typename X = typename estimate_input<typename range_value<R>::type>::type,
+ typename B = mpl::empty_base
+>
+struct TrainableEstimator
+ : Estimator<
+ E,
+ X,
+ Trainable<E,R,B>
+ >
+{};
+
+}// estimator_concept
+}// statistics
+}// boost
+
+#endif
\ No newline at end of file

Added: sandbox/statistics/estimator_concept/libs/statistics/estimator_concept/doc/readme.txt
==============================================================================
--- (empty file)
+++ sandbox/statistics/estimator_concept/libs/statistics/estimator_concept/doc/readme.txt 2009-08-28 20:00:09 EDT (Fri, 28 Aug 2009)
@@ -0,0 +1,30 @@
+//////////////////////////////////////////////////////////////////////////////
+// statistics::estimator_concept::doc::readme //
+// //
+// (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) //
+//////////////////////////////////////////////////////////////////////////////
+
+[ Contact ]
+
+erwann.rogard_at_[hidden]
+
+[ Overview ]
+
+C++ tools for concept checking of statistical estimators.
+See sandbox/statistics/goodness_of_fit for an application.
+
+[ Compiler ]
+
+gcc version i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1
+
+[ Dependencies ]
+
+/usr/local/boost_1_39_0/
+
+[ History ]
+
+August 2009 - Creation
+


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