[GiNaC-list] custom print function for GiNaC::add and GiNaC::mul for deterministic printing

Vladimir V. Kisil V.Kisil at leeds.ac.uk
Tue Oct 12 12:20:25 CEST 2021


	Following the previous discussion I am attaching just in case
  a trivial patch which opens an access to expairseq elements. 
-- 
Vladimir V. Kisil                 http://www.maths.leeds.ac.uk/~kisilv/
  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/MoebInv-notebooks
>>>>> On Tue, 12 Oct 2021 09:55:57 +0000, "Vladimir V. Kisil" <V.Kisil at leeds.ac.uk> said:

    VVK> 	Dear Christian,

    VVK> 	I see now. It is not difficult to add access methods to
    VVK> elements of expairseq if GiNaC gurus do not see any objections.

    VVK>   Another option may be to use expairseq::map() in some way.
  
    VVK>   Best wishes, Vladimir -- Vladimir V. Kisil
    VVK> http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius
    VVK> Maps https://doi.org/10.1142/p835 Soft: Geometry of cycles
    VVK> http://moebinv.sourceforge.net/ Jupyter notebooks:
    VVK> https://github.com/vvkisil/MoebInv-notebooks
>>>>> On Tue, 12 Oct 2021 09:33:53 +0000, "Diddens, Christian (UT-TNW)
    VVK> via GiNaC-list" <ginac-list at ginac.de> said:

    CD> Dear Vladimir,

    CD> thanks for your answer.

    CD> I think it will work and this would be my fallback, but it will
    CD> convert each expair in an ex, which I then have to check again
    CD> for the sign of the coefficient, or whether it is a negative
    CD> power in mul, and so on.

    CD> I just wanted to make sure a priori whether there is a better
    CD> way directly working on the expairs, but if not, I'll go over
    CD> the op() of course.

    CD> Best regards,

    CD> Christian

    CD> Am Dienstag, dem 12.10.2021 um 09:25 +0000 schrieb Vladimir
    CD> V. Kisil:
    >>> Dear Christian,
    >>> 
    >>> Just a quick question: why does expairseq::op() method
    >>> (inherited by sums and muls, I think) will not work for you?
    >>> 
    >>> Best wishes, Vladimir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-methods-to-access-elements-of-expairseq.patch
Type: text/x-diff
Size: 1002 bytes
Desc: A short patch.patch
URL: <http://www.ginac.de/pipermail/ginac-list/attachments/20211012/4ad5a40c/attachment.bin>


More information about the GiNaC-list mailing list