From: Eric Niebler (eric_at_[hidden])
Date: 2007-02-06 14:13:45
Niitsuma Hirotaka wrote:
>> > But, in order to add a component requires covarite input, we need to
>> > modify statistics_fwd.hpp.
>> > (When I described join_histgram component, I need to modify
>> > statistics_fwd.hpp and depended other components density.hpp and so
>> on .)
>> > I think this is not good.
>> > If possible, just add a file which describes a statistical method, and
>> > include the file, is better.
>> I'm not sure I understand. Why did you have to modify
>> statistics_fwd.hpp? You shouldn't have to.
> Let us consider the case covariance depend on
> and p_square_cumulative_distribution_of_variates
> Attached files are implimentation of the covariance depend on
> Plz try to compile these file without replacing statistics_fwd.hpp to
> attached file.
> In my environment, without modifing statistics_fwd.hpp , I can not
> compile these files.
> In order to compile, we need to add the following line in
> namespace impl
> template<typename Sample, typename Tag = tag::sample>
> struct p_square_cumulative_distribution_impl;
The forward declaration must appear *somewhere*. It doesn't have to be
in statistics_fwd.hpp. As an end user of the statistical accumulators
library, you do not have to modify any of the files in the library if
you want to extend it by implementing your own stats. Your code would
work just as well if you moved the forward declaration out of
statistics_fwd.hpp and into your covariance2.hpp.
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk