> Let G be some Gröbner basis, obtained with Singular (via the
> interface). I'd like to have a list comprising the exponent vector (as
> a python list/tuple of integers) of each standard monomial for G, in a
> fixed weighted degree d.
>
> So, i could use weightKB(G, d, <intvec of degree weights>) via the
> interface and get the exponent vectors from there. But this involves a
> lot of communication between Sage and Singular and therefore is slow.
But this one returns all the information you need at once, doesn't it? If so,
I'd call it, then get the result as a string and perform string parsing on
the result. Sometimes it also makes sense to have Singular pre-process the
data for you such that it is easier to parse.
> Do you have hints how to get the data in the quickest way? E.g.,
> Michael wrote something about the interface behaving quadratic.
I would also be interested in this.
> Does that mean it is better to send many small and simply structured data
> packages through the interface, rather than sending few huge and
> complicated data packages?
Definitely not! Each send/receive is an interprocess communication via the
operation system which is quite expensive given small sets of data. You
certainly want to limit the number of communication acts.
> weightKB is in Singular's standard.lib, hence, is interpreted code. I
> thought it might be worth-while to implement the same thing in cython
> (hence, compiled), but on the other hand, in order to do so one would
> need to send information on the leading monomials of G from Singular
> to Sage, which, again, is slow.
This depends on the GB you have. If you just need it in a commutative
polynomial ring you can call Ideal.groebner_basis('libsingular:std') or
Ideal.groebner_basis('libsingular:slimgb') on your ideal. If your idea has to
be a singular object (because it is e.g. in a non-commutative ring) it is
probably better to stick to Singular for this task as the communication
overhead would probably kill all your Cython speedups.
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---