MCPcopy Create free account
hub / github.com/Singular/Singular / create_ring

Function create_ring

Singular/dyn_modules/python/util.py:5–28  ·  view source on GitHub ↗
(char=0, nvars=1, varNames=None, ordering="dp", degvec=None, register=None)

Source from the content-addressed store, hash-verified

3singular=SingularGlobalsProxy()
4
5def create_ring(char=0, nvars=1, varNames=None, ordering="dp", degvec=None, register=None):
6 if not varNames:
7 varNames=["x("+str(i)+")" for i in range(1,nvars+1)]
8 else:
9 nvars=len(varNames)
10 if not degvec:
11 degvec=IntVector()
12 for i in range(0,nvars):
13 degvec.append(1)
14 modulweights=IntVector()
15 modulweights.append(0)
16 l=[char,varNames,[[ordering,degvec],["C",modulweights]], Ideal()]
17 res=singular.ring(l)
18 if register is None:
19 return res
20 else:
21 old_ring=Ring()
22 res.set()
23 for i in range(nvars):
24 v=singular.var(i+1)
25 register[str(v)]=v
26
27 old_ring.set()
28 return res
29
30
31class EquivalenceRelation(object):

Callers 2

OM2ringFunction · 0.90
symm.pyFile · 0.85

Calls 7

strFunction · 0.85
rangeFunction · 0.85
varMethod · 0.80
IdealClass · 0.70
RingClass · 0.70
appendMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected