[GiNaC-devel] removing the evil
Alexei Sheplyakov
varg at theor.jinr.ru
Tue Jul 15 12:03:16 CEST 2008
On Tue, Jul 15, 2008 at 10:51:18AM +0200, Jens Vollinga wrote:
> Dear Alexei,
>
> Alexei Sheplyakov schrieb:
> > 1. One can compare expressions in a natural way (with operator==,
> > operator==, etc) instead of GiNaC-specific is_equal().
> > 2. (a consequence of 1) No bugs like this:
> > 3. (a consequence of 1) STL containers and algorithms "just work" with
> > GiNaC classes.
>
> okay, so far the advantages. I like them. But then, how would one write
> the equalities to be given to solve(),
What about associative arrays? I.e.
exmap eqns;
eqns[a*x + b*y] = 5;
eqns[c*x + d*y] = 7;
exvector vars = boost::list_of(x)(y);
exmap result = solve(eqns, vars);
> subs(), ...?
This one is even more simple, because subs() already accepts an exmap.
> series(),
Just pass 2 arguments (the variable and the expansion point).
> Also, the answers returned by GiNaC like x==0 need to be given differently.
I think an exmap is a natural form for such answers.
Best regards,
Alexei
--
All science is either physics or stamp collecting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-devel/attachments/20080715/0625c0d2/attachment.sig
More information about the GiNaC-devel
mailing list