No get_name() method of GiNaC::constant?
GiNaC::constant has a private string attribute called `name`. This is what is output when doing stream io. Is there a reason this class doesn't have a public get_name() method, so that code that generates code for another language can get the name instead of having to use, for example, stringstream? Warren
On Wed, 9 Jul 2025 11:11:09 -0400, Warren Weckesser <warren.weckesser@gmail.com> said:
WW> GiNaC::constant has a private string attribute WW> called `name`. This is what is output when doing stream io. Is WW> there a reason this class doesn't have a public get_name() WW> method, so that code that generates code for another language WW> can get the name instead of having to use, for example, WW> stringstream? Indeed, the GiNaC tutorial says "Constants behave pretty much like symbols..." and there is symbol::get_name() method. Thus I am submitting a micro patch for it to GiNaC-dev. -- Vladimir V. Kisil http://v-v-kisil.scienceontheweb.net Book: Geometry of Mobius Maps https://doi.org/10.1142/p835 Soft: Geometry of cycles http://moebinv.sourceforge.net/ Jupyter notebooks: https://github.com/vvkisil?tab=repositories
On 7/14/25 9:27 AM, Vladimir V. Kisil via GiNaC-list wrote:
On Wed, 9 Jul 2025 11:11:09 -0400, Warren Weckesser <warren.weckesser@gmail.com> said:
WW> GiNaC::constant has a private string attribute WW> called `name`. This is what is output when doing stream io. Is WW> there a reason this class doesn't have a public get_name() WW> method, so that code that generates code for another language WW> can get the name instead of having to use, for example, WW> stringstream?
Indeed, the GiNaC tutorial says "Constants behave pretty much like symbols..." and there is symbol::get_name() method. Thus I am submitting a micro patch for it to GiNaC-dev.
Makes sense to me. Applied. Thanks! -richy.
participants (3)
-
Richard B. Kreckel
-
Vladimir V. Kisil
-
Warren Weckesser