本文整理汇总了Python中jas.PolyRing.inject_variables方法的典型用法代码示例。如果您正苦于以下问题:Python PolyRing.inject_variables方法的具体用法?Python PolyRing.inject_variables怎么用?Python PolyRing.inject_variables使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jas.PolyRing
的用法示例。
在下文中一共展示了PolyRing.inject_variables方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Q
# 需要导入模块: from jas import PolyRing [as 别名]
# 或者: from jas.PolyRing import inject_variables [as 别名]
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import PolyRing
from jas import Ideal
from jas import QQ, AN
from jas import terminate
from jas import startLog
# polynomial examples: factorization over Q(i)(sqrt2)
Q = PolyRing(QQ(),"i",PolyRing.lex);
print "Q = " + str(Q);
Q.inject_variables();
print "i = " + str(i);
imag = i**2 + 1;
print "imag = " + str(imag);
Qi = AN(imag,field=True);
print "Qi = " + str(Qi.factory());
Qi.inject_variables();
print "i = " + str(i);
print;
Wr = PolyRing(Qi,"w2",PolyRing.lex)
print "Wr = " + str(Wr);
Wr.inject_variables();
print "i = " + str(i);
print "w2 = " + str(w2);
w2p = w2**2 - 2;