unique expressions

Christian Bauer cbauer at student.physik.uni-mainz.de
Fri Jun 30 17:59:47 CEST 2000


Hi!

On Mon, 26 Jun 2000, Ben Sapp wrote:
> How can I make an expresion unique?   That is, I want it to copy the
> thing it references not just increment the reference.

This seems to do it:

  symbol x("x");
  ex a = pow(x,2)+2*x+1;
  ex b = *(a.bp->duplicate());

Why do you need this?

Bye,
Christian

-- 
  / Coding on PowerPC and proud of it
\/ http://www.uni-mainz.de/~bauec002/

-
To UNSUBSCRIBE, email to ginac-list at ginac.de with a subject of "unsubscribe".



More information about the GiNaC-list mailing list