|
Boost : |
From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-29 21:27:41
Hubert HOLIN wrote:
> I propose the creation of namespace ::boost::math .
I agree.
> I propose the creation of namespace
> ::boost::math::special_functions .
I have doubts about this: see below.
> This namespace would contain atanh, sinc and sinhc, and would
> welcome other such functions.
> Other subnamespaces might include a ::boost::math::constants
> for (obviously) math constants, a ::boost::math::numerics for numerical
> methods (perhaps yet subdivided into optimization, integration, etc.).
There is a danger here of too many namespaces with no clear
cut division between them.
There is another problem: std isn't so factored.
Finally: I do not like having quaternions in one namespace,
and 'sin' in another, because it defeats Koenig lookup.
Instead of writing:
boost::math::quaternion<double> q;
cout << sinh(q) << endl;
I'd be forced to write
cout << boost::math::special_functions::sinh(q) << endl;
or somehow bring 'sinh(quaternion)' into the current namespace.
[I'm not opposed to the factoring, just dubious]
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 New generation programming language Felix http://felix.sourceforge.net Literate Programming tool Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk