本文整理汇总了Java中edu.jas.poly.ExpVector.sum方法的典型用法代码示例。如果您正苦于以下问题:Java ExpVector.sum方法的具体用法?Java ExpVector.sum怎么用?Java ExpVector.sum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.jas.poly.ExpVector
的用法示例。
在下文中一共展示了ExpVector.sum方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: criterion4
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* GB criterion 4. Use only for commutative power series rings.
* @param A power series.
* @param B power series.
* @param e = lcm(ht(A),ht(B))
* @return true if the S-power-series(i,j) is required, else false.
*/
public boolean criterion4(MultiVarPowerSeries<C> A, MultiVarPowerSeries<C> B, ExpVector e) {
if (logger.isInfoEnabled()) {
if (!A.ring.equals(B.ring)) {
logger.error("rings not equal " + A.ring + ", " + B.ring);
}
if (!A.ring.isCommutative()) {
logger.error("GBCriterion4 not applicabable to non-commutative power series");
return true;
}
}
ExpVector ei = A.orderExpVector();
ExpVector ej = B.orderExpVector();
ExpVector g = ei.sum(ej);
// boolean t = g == e ;
ExpVector h = g.subtract(e);
int s = h.signum();
return !(s == 0);
}
示例2: criterion4
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* GB criterium 4. Use only for commutative polynomial rings. <b>Note:</b>
* Experimental version for r-Groebner bases.
* @param A polynomial.
* @param B polynomial.
* @return true if the S-polynomial(i,j) is required, else false.
*/
@Override
public boolean criterion4(GenPolynomial<C> A, GenPolynomial<C> B) {
if (logger.isInfoEnabled()) {
if (A instanceof GenSolvablePolynomial || B instanceof GenSolvablePolynomial) {
logger.error("GBCriterion4 not applicabable to SolvablePolynomials");
return true;
}
}
ExpVector ei = A.leadingExpVector();
ExpVector ej = B.leadingExpVector();
ExpVector g = ei.sum(ej);
ExpVector e = ei.lcm(ej);
// boolean t = g == e ;
ExpVector h = g.subtract(e);
int s = h.signum();
if (s == 0) { // disjoint ht
C a = A.leadingBaseCoefficient();
C b = B.leadingBaseCoefficient();
C d = a.multiply(b);
if (d.isZERO()) { // a guess
return false; // can skip pair
}
}
return true; //! ( s == 0 );
}
示例3: criterion4
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* GB criterium 4. Use only for commutative polynomial rings. This version
* works also for d-Groebner bases.
* @param A polynomial.
* @param B polynomial.
* @return true if the S-polynomial(i,j) is required, else false.
*/
@Override
public boolean criterion4(GenPolynomial<C> A, GenPolynomial<C> B) {
if (logger.isInfoEnabled()) {
if (A instanceof GenSolvablePolynomial || B instanceof GenSolvablePolynomial) {
logger.error("GBCriterion4 not applicabable to SolvablePolynomials");
return true;
}
}
ExpVector ei = A.leadingExpVector();
ExpVector ej = B.leadingExpVector();
ExpVector g = ei.sum(ej);
ExpVector e = ei.lcm(ej);
// boolean t = g == e ;
ExpVector h = g.subtract(e);
int s = h.signum();
if (s == 0) { // disjoint ht
C a = A.leadingBaseCoefficient();
C b = B.leadingBaseCoefficient();
C d = a.gcd(b);
if (d.isONE()) { // disjoint hc
return false; // can skip pair
}
}
return true; //! ( s == 0 );
}
示例4: isSigRedundant
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* Is sigma redundant.
* @param A polynomial.
* @param G polynomial list.
* @return true if A is sigma redundant with respect to G.
*/
public boolean isSigRedundant(List<SigPoly<C>> G, SigPoly<C> A) {
if (G.isEmpty()) {
return false;
}
ExpVector e = A.sigma.leadingExpVector();
if (e == null) {
e = A.poly.ring.evzero;
}
for (SigPoly<C> p : G) {
if (p.sigma.isZERO()) {
continue;
}
ExpVector f = p.sigma.leadingExpVector();
if (f == null) { // does not happen
f = p.poly.ring.evzero;
}
boolean mt = e.multipleOf(f);
if (mt) {
ExpVector g = e.subtract(f);
ExpVector h = p.poly.leadingExpVector();
h = h.sum(g);
if (h.compareTo(A.poly.leadingExpVector()) == 0) {
return true;
}
}
}
return false;
}
示例5: criterion4
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* GB criterium 4. Use only for commutative polynomial rings.
* @param ei exponent vector.
* @param ej exponent vector.
* @param e = lcm(ei,ej)
* @return true if the S-polynomial(i,j) is required, else false.
*/
public boolean criterion4(ExpVector ei, ExpVector ej, ExpVector e) {
ExpVector g = ei.sum(ej);
ExpVector h = g.subtract(e);
int s = h.signum();
return s != 0;
}