本文整理汇总了Python中jas.PolyRing.one方法的典型用法代码示例。如果您正苦于以下问题:Python PolyRing.one方法的具体用法?Python PolyRing.one怎么用?Python PolyRing.one使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jas.PolyRing
的用法示例。
在下文中一共展示了PolyRing.one方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PolyRing
# 需要导入模块: from jas import PolyRing [as 别名]
# 或者: from jas.PolyRing import one [as 别名]
from jas import Ring, PolyRing, ParamIdeal, QQ, ZM, RR
from jas import startLog, terminate
# Boolean coefficient boolean GB
# see S. Inoue and A. Nagai "On the Implementation of Boolean Groebner Bases" in ASCM 2009
# Z_2 regular ring coefficent example
r = PolyRing(RR(ZM(2),3),"a,x,y",PolyRing.lex);
print "r = " + str(r);
#print len(r.gens())
[s1,s2,s3,a,x,y] = r.gens();
one = r.one();
print "one = " + str(one);
print "s1 = " + str(s1);
print "s2 = " + str(s2);
print "s3 = " + str(s3);
print "a = " + str(a);
print "x = " + str(x);
print "y = " + str(y);
#brel = [ a**2 - a, x**2 - x, y**2 - y ];
brel = [ x**2 - x, y**2 - y ];
#print "brel = " + str(brel[0]) + ", " + str(brel[1]) + ", " + str(brel[2]);
print "brel = " + str(brel[0]) + ", " + str(brel[1]);