[GiNaC-list] subscripted variables

Marko Riedel riedelmo at mathematik.uni-stuttgart.de
Mon Feb 6 06:18:11 CET 2023


Post Scriptum. I managed to get the subscripts by subclassing the symbol 
class to attach an integer to it. Still I wonder if that is the best way 
to go about it.

Am 05.02.23 um 23:07 schrieb Marko Riedel:
> Greetings to all.
> 
> I am at this time considering to use GiNaC for some computations from 
> group theory. I am not a C++ programmer. I would like to ask for 
> assistance with the following task. I have a polynomial in several 
> variables like a[1], a[2], a[5] etc. I understand I can initialize these 
> by creating a symbol object with the variable name. The problem is, I 
> need an easy and conformal means of accessing the integer in the 
> variable name. This could be done by matching the name to a regular 
> expression and extracting the value but I imagine there must be a better 
> way.
> 
> I am also looking for a means of extracting a set of variables that are 
> present in a polynomial, or the degree these variables have. 
> Furthermore, another question, does the C++ standard library have a 
> means of memoizing functions?
> 
> Thank you for your assistance.
> 
> Marko Riedel
> 
> _______________________________________________
> GiNaC-list mailing list
> GiNaC-list at ginac.de
> https://www.ginac.de/mailman/listinfo/ginac-list


More information about the GiNaC-list mailing list