|
Boost Users : |
Subject: [Boost-users] [Accumulators] How to define the initial value ?
From: Adrien Todeschini (adrien.todeschini_at_[hidden])
Date: 2010-10-08 11:58:26
Hi everyone,
As the code of weighted_sum_impl constructor is
[ in header <boost/accumulators/statistics/weighted_sum.hpp> ]
template<typename Args>
weighted_sum_impl(Args const &args)
: weighted_sum_(
args[parameter::keyword<Tag>::get() | Sample()]
* numeric::one<Weight>::value
)
{
}
and the template parameter Tag is defined as tag::sample
namespace tag
{
struct weighted_sum
: depends_on<>
{
typedef accumulators::impl::weighted_sum_impl<mpl::_1, mpl::_2,
tag::sample> impl;
};
}
How can I define this tagged argument when initializing the accumulator_set
?
( Indeed, weighted_sum_impl constructor is called at this point )
Thanks in advance for your help.
Adrien
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net