spielwiese
Last change
on this file since c36fda was
c36fda,
checked in by Oleksandr Motsak <motsak@…>, 10 years ago
|
Moved all the outdated modgen related stuff to /old_modgen/ for now
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | ring r=0,(x,y,z,a,b),lp; |
---|
2 | poly f=37x3y+x2yz; |
---|
3 | ideal i=f,f*f,f*f*f; |
---|
4 | LIB "poly.lib"; |
---|
5 | ideal i2=cyclic(5); |
---|
6 | |
---|
7 | print(i2); |
---|
8 | LIB("/Users/michael/sing3/modules/python/python_module.so"); |
---|
9 | Python_module::python("from interpreter import singular_globals_proxy |
---|
10 | #import psyco |
---|
11 | import sys |
---|
12 | sys.argv=['Singular'] |
---|
13 | #import sre_compile |
---|
14 | #psyco.bind(sre_compile._optimize_charset) |
---|
15 | #psyco.log() |
---|
16 | #psyco.profile() |
---|
17 | from CAS.singular import * |
---|
18 | from context import * |
---|
19 | context=Context() |
---|
20 | |
---|
21 | |
---|
22 | import CD.polyd as polyd |
---|
23 | import CAS.singular |
---|
24 | context.addCDImplementation(polyd.implementation) |
---|
25 | |
---|
26 | from CD.polyd import groebnersym |
---|
27 | |
---|
28 | inter=singular_globals_proxy() |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | |
---|
33 | cyc3=encodeIdeal(singular.i2) |
---|
34 | ord=encodeOrdering(singular.r) |
---|
35 | gcall=OMApply(groebnersym,[ord,cyc3]) |
---|
36 | gcout=open('cyc3om','w') |
---|
37 | gcout.write(context.XMLEncodeObject(gcall)) |
---|
38 | gcout.close() |
---|
39 | |
---|
40 | print 'now calculating GB' |
---|
41 | omin=context.XMLEncodeObject(gcall) |
---|
42 | from omxmlreader import * |
---|
43 | def inout(context, infn): |
---|
44 | doc=readFile(infn) |
---|
45 | builder=OMFromXMLBuilder() |
---|
46 | doc=builder.build(doc) |
---|
47 | doc=context.evaluate(doc) |
---|
48 | output=context.XMLEncodeObject(doc) |
---|
49 | gcout=open('cyc3om.out','w') |
---|
50 | gcout.write(output) |
---|
51 | gcout.close() |
---|
52 | |
---|
53 | inout(context,'cyc3om') |
---|
54 | |
---|
55 | |
---|
56 | "); |
---|
57 | $ |
---|
Note: See
TracBrowser
for help on using the repository browser.