Subject: Re: [boost] Log/tropical semiring for boost math
From: John Maddock (boost.regex_at_[hidden])
Date: 2010-04-10 12:06:56
> I work in machine learning, and often need to do probability computations
> the log scale to avoid underflows. A nice way to do this is to use a class
> where the add, divide etc. operators are overloaded by their log scale
> equivalents (e.g. log(a*b) = log(a) + log(b)). In other words a class
> implementing the log semiring <http://en.wikipedia.org/wiki/Semiring>.
> useful in this context is the tropical semiring, where adding is replaced
> taking the maximum (or minimum) of the arguments. I looked for these in
> boost math library, but couldn't find anything. So I wrote my own. Did I
> miss something? And if not, is anyone interested in adding my
> to boost math?
No you didn't miss anything, I think this would need reviewing as a new
"sub-library" of Boost.Math, but I would encourage you to make your code
available and seek a review if folks are interested.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk