Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-20 10:21:25


Markus Werle wrote:
> Steven Watanabe <watanabesj <at>> writes:
>> If you want to iterate over all the terms in a transform use fold_tree.
>> I don't see any benefit of flattening the expression, besides making things
>> harder for proto :)
> We are talking about a general purpose ET library here.
> There are n-ary operators and function calls in the RealWorld.
> So these _must_ be first class citizens in proto.

Of course. But that doesn't mean that a + b + c + d + e + f + g has to
hold all the elements a to f directly.

> Having (a+b+c+d) represented has expr<sum, etc.> is crucial
> for what I want to do with proto, namely compile-time
> analytic differentiation in conjunction with expression
> simplification.

I'm afraid that I still don't understand why creating a flattened view
when you process it
doesn't work. If this still bothers you, think of it as a cons list
instead of a tree.

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at