Boost logo

Boost Users :

Subject: Re: [Boost-users] Extending boost::function for mathematics?
From: jesseperla (jesseperla_at_[hidden])
Date: 2009-01-28 16:50:59


> don't see what proto has to do with this.
> Or I still don't understand what proto is intended for.
Well, I would guess that if this is built out with proto, it will make
it much easier and standard to generalize your own functions and for
boost math to implement this for all of theirs. Or maybe I was just
trying to sell the proto/expression template guys on getting
interested in this problem because they are all geniuses.

> I don't understand. Simply replace double with the type of your to be written AD class.
Sure, and if boost standardized those types it would be great. But
there are two things here. All of your functions you use have to use
these new types. Which may be reasonably easy to implement if all of
your functions have been written generically (and tougher if you are a
library scavenger like me). But a bigger problem is when dealing with
multi-dimensions. Forcing conversions of all arrays back and forth
between different formats when you use other libraries (I will be
using this in solvers and optimizers as well) can be a real issue
unless they were all written with the same AD types. And matrices are
even worse since there doesn't seem to be an agreed on matrix concept
for element access to write generic code(e.g. boost ublas focuses on
mymat(index1, index2), and mymat.begin1() to get an column iterator,
where multi_array<double, 2> is myarr[i][j] and has different iterator
concepts).

> I sincerely hope that such a class makes it into boost soon.

Amen!


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net