[GiNaC-list] array expressions with symbolic index

Zhongxing Xu xuzhongxing at gmail.com
Thu Feb 1 06:47:21 CET 2007


Thank you for tips.
Let me try to figure it out myself first.

2007/2/1, Sheplyakov Alexei <varg at theor.jinr.ru>:
>
> Hi!
>
> On Wed, Jan 31, 2007 at 10:16:56PM +0800, Zhongxing Xu wrote:
>
> > Is there something like array expression in GiNaC?
>
> Could you elaborate, please? What is exactly "array expression"?
>
> > For example:
> > x = mem[2] + 2;
> > y = mem[i] -3;
> > Can GiNaC represent these expressions?
> > Note that array index might be a symbolic value.
>
> GiNaC supports associative arrays with expressions as keys, i.e.
>
> symbol x("x"), y("y"), z("z");
> exmap m; // nothing really magic: std::map<ex, ex, ex_is_less>
> m[z] = 2*x + y;
> m[1] = sin(y);
>
> > x >= 3;
>
> Syntactically, this is correct GiNaC code. It creates object of
> the GiNaC::relational type. But I wonder what is _your_ interpretation...
>
> > After checking out the reference manual of GiNaC, I guess class idx and
> > varidx and indexed() is the thing for me. Is it right?
>
> I don't think so.
>
> Best regards,
> Alexei
>
> --
> All science is either physics or stamp collecting.
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
>
> iQIVAwUBRcDJebL3rFoFceCwAQLvdw//cTzW84BkgGzzrBxXDdLFnlD+2I3+JYL+
> qtAd9oJdr16XRF68GAFJa8fYgDFuiymKspaHzoxwkPQhTUeclezjNNR3NMGiSSxG
> xpSNfEYXuPSQ+W6dgbmgAtScCTYl0hALgqEh9llE8zNT4K56iKW4U4D7k5Aw2YND
> 9NNlQk8jbqgtzHYO0ip92a0XJ/Y2iIIGGL7hdR9UWIzjqQF7sa1oTBhb/itRr48l
> Bx3DoC7NtBqDJqjN4ZjZXIEVQ40ZRy6GimJMcph4pVND3ax3YmUMRmSlrL8OCFCJ
> 3mLXf1zBvJljo2LwyfRFUWEmcf4UGkYSINrTdVUpiU6RBobA6IEVZP2IkEYtmr0w
> vt/oeqiL7oIANNe72JGFVqIqExCLUNHtMTUx69rKjNd8FZn2hU31osRvFAIsfMbM
> ClGBBjf1l19ZTGUGLkcPzWhK3sVLxIOHwuy5bAPyXllehZhI5AYS+4jigGxvsdap
> S/iYDi+HVhteBygTXTUrBRyJY5CiV/Clwx5pTZnM1lgASRUoUM7dukF3BjwPgVVl
> VOtYdyC2+jOpW+dE0nXhdatHi4rce1WBhsZ67Ak/vcbWgGfK14K+6dV7VpLxaIU5
> PQSTH0UBpTCzquhsxjVmmHcg9XdhxsfcKTsKlJvzTVRVdK/C44KcA81ebqyGE60l
> fnOg5IER/CI=
> =66N+
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> GiNaC-list mailing list
> GiNaC-list at ginac.de
> https://www.cebix.net/mailman/listinfo/ginac-list
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cebix.net/pipermail/ginac-list/attachments/20070201/487547d5/attachment.html


More information about the GiNaC-list mailing list