matrices and expressions

Christian Bauer Christian.Bauer at Uni-Mainz.DE
Thu Feb 27 18:50:24 CET 2003


On Thu, Feb 27, 2003 at 05:43:16PM +0100, Johan Rutgeerts wrote:
> why does GiNaC::unity_matrix return a GiNaC::ex ?

"ex" is the natural type for passing around symbolic objects in GiNaC.
It's lightweight and has automatic free store management.

> or why does A + B with A and B both a GiNaC::matrix return a GiNaC::ex?

Matrix expressions in GiNaC remain unevaluated unless you call evalm()
(it mimics Maple in this respect). Or use matrix::add().

> And how do I convert such a GiNaC::ex to a matrix? Can this be done?



  / Coding on PowerPC and proud of it

More information about the GiNaC-list mailing list