spielwiese
Last change
on this file since 70dcbd was
70dcbd,
checked in by Michael Brickenstein <bricken@…>, 19 years ago
|
*bricken: progresses for Singular integration
git-svn-id: file:///usr/local/Singular/svn/trunk@8630 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
467 bytes
|
Line | |
---|
1 | from Singular import * |
---|
2 | from interpreter import * |
---|
3 | from objects import * |
---|
4 | from polyd import DMPsym, SDMPsym, termsym |
---|
5 | singular=singular_globals_proxy() |
---|
6 | def encodePoly(p): |
---|
7 | terms=[encodeTerm(t) for t in p] |
---|
8 | return OMApply(SDMPsym,terms) |
---|
9 | |
---|
10 | def encodeTerm(t): |
---|
11 | """FIXME: ugly because it uses slow interpreter interface""" |
---|
12 | exponents=singular.leadexp(t) |
---|
13 | c=singular.leadcoef(t) |
---|
14 | exponents=[OMint(i) for i in exponents] |
---|
15 | return OMApply(termsym,[OMint(str(c))]+exponents) |
---|
Note: See
TracBrowser
for help on using the repository browser.