|
Boost : |
From: Brook Milligan (brook_at_[hidden])
Date: 2007-03-05 14:35:35
It seems that the mcs-units library is moving along well. I have one
question, though, about scope and whether the following should be
within the scope of this library or within the scope of another one.
In building probability and likelihood models, I often encounter the
issue of transforming from either to their logarithms and vice versa.
Code would be much simpler and less error-prone if the appropriate
domain was defined, the natural arithmetic operators were used, and
the conversions occurred (or could be prevented to catch errors) as
necessary, but without necessarily requiring explicit bookkeeping to
distinguish these quantities and their logarithms.
This suggests a (small) set of types with appropriate conversions,
much as in the units library. However, probabilities are of course
unitless.
Should this idea be developed as a separate library or does it make
any sense to fold it into the existing units framework?
Cheers,
Brook
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk