[Prev] Thread [Next]  |  [Prev] Date [Next]

[sage-support] Multivariate polynomials in Sage Nathann Cohen Wed Aug 26 12:03:06 2009

Hello everybody !!!

I am trying to make Linear Programming in Sage a bit easier, and I
looked into Sage's features concerning multivariate polynomials...

I first wanted indexed variables, and it seems pretty easy to build :
y = RR['y0, y1, y2'].gens()

and then


But I have two questions now :
    * Could it be possible to define variables indexed two times ?
Something like y[0][1]*y[2][3] ?
      Could it even be possible to define "dictionary" variables ( I
mean a dictionary of variables  )

    * Besides, when I have on one hand a variable y :
              y = RR['y0, y1, y2'].gens()

      And a variable x :

             x = RR['x0, x1, x2'].gens()

     How can I easily multiply x[0]*y[2] or add them ?

My problem is that I would like to easily ( from the syntaxical point
of view ) be able to define linear functions on formal variables,
under the constraints that I never know how many variables I will have
to use in the end ( I prefer not having to declare them at the
beginning ), and also that I may need a variable x[10][30] without
needing a variable x[2][6] ( it would be very handy for me to be able
to declare "dictionary" variables )

I know I may ask a lot, though.... :-)

Thank you for your help !!!!


To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
URLs: http://www.sagemath.org