Thank you for your example. I have one question: how do you use (or assign something to) the intermediate values in StoredMatrixExpression?
> On Thu, Apr 7, 2011 at 12:45 AM, Karsten Ahnert > <karsten.ahn...@ambrosys.de> wrote: >> Another question is: can a node have a state. In my algorithm it would >> be nice, if every proto::multiplies< > node stores some intermediate >> values which are used during later evaluations of the tree. > > I did something similar to this to resolve the issue I had with the > Eigen matrix library. I am replacing multiplies nodes with an > expression that uses proto::extends to add extra state, in this case a > correctly sized matrix to store the temporary matrix Eigen generates. > > I've attached the header that does the node replacement in all the > cases that match the WrappableElementExpressions ("Wrap" in the header > means replacing the node). Note that this header is ripped out of the > context of a larger application (used for finite elements), so some > stuff will not make sense, but the general idea might be helpful. > > I am using a primitive transform (WrapMatrixExpression) to do the > actual node replacement here. An alternative would be to create a > domain, and then use the make_... family of transforms to create nodes > in that domain. I went for the primitive transform because it seemed > to compile faster and with less memory. > > I intend to post a more detailed example on how I solved the problem > with Eigen later on, with examples that are more stand-alone. > > Cheers, > > -- > Bart > _______________________________________________ > proto mailing list > proto@lists.boost.org > http://lists.boost.org/mailman/listinfo.cgi/proto > Karsten Ahnert Ambrosys GmbH - Gesellschaft für Management komplexer Systeme Geschwister-Scholl-Str. 63a D-14471 Potsdam Tel: +4917682001688 Fax: +493319791300 Ambrosys GmbH - Gesellschaft für Management komplexer Systems Gesellschaft mit beschränkter Haftung Sitz der Gesellschaft: Geschwister-Scholl-Str. 63a, 14471 Potsdam Registergericht: Amtsgericht Potsdam, HRB 21228 P Geschäftsführer: Karsten Ahnert, Dr. Markus Abel Karsten Ahnert Ambrosys GmbH - Gesellschaft für Management komplexer Systeme Geschwister-Scholl-Str. 63a D-14471 Potsdam Tel: +4917682001688 Fax: +493319791300 Ambrosys GmbH - Gesellschaft für Management komplexer Systems Gesellschaft mit beschränkter Haftung Sitz der Gesellschaft: Geschwister-Scholl-Str. 63a, 14471 Potsdam Registergericht: Amtsgericht Potsdam, HRB 21228 P Geschäftsführer: Karsten Ahnert, Dr. Markus Abel _______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto