|
Boost : |
From: Gavin Collings (gcollings_at_[hidden])
Date: 2000-03-07 07:51:01
> If that makes you nervous, I will happily remove the special case.
> I just felt happy about how naturally C++ supports at least a partial
> solution to the correlation problem.
It's the word partial that makes me nervous. Do it all or not at all in my
view.
> Since correlation is always defined between two variables,
> we would have to be able to specify the correlation of some
> interval A with all other intervals. For example, A could
> be forward correlated with B, B reverse with C, and A reverse
> with D. Furthermore, some functions such as sin() may break
> correlation for certain argument ranges. For example, sin()
> is correlation-conserving if you're lucky enough to be on a
> subrange of sin() where it is monotonously increasing, it is
> correlation-reversing on a subrange where it is monotonously
> decreasing, and it breaks correlation otherwise.
Yes, I realized that there would be difficulties with this type of thing,
especially functions, my thought (not a deep one) was to allow it to sort itself
out by looking at the outputs. The propogation of these correlations though is
not trivial, though.
> This seems to be the job of a specialized package, but it is
> definitely beyond the scope of the current interval class.
> Keep simple things simple.
Agreed
> I am happy to live with "do nothing", since we have the square()
> member function and an overloaded pow(x, int) which handle
> the important x**y cases. However, I would like to leave the special
> case for x*x in, because there's no other natural expression
> for it in standard C++.
Lets do nothing then.
Another point that's just occurred to me. Have you considered how the interval
concept could be used with std::complex?
Gavin.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk