当前位置: 首页>>代码示例>>Java>>正文


Java ExpVector.sum方法代码示例

本文整理汇总了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);
}
 
开发者ID:kredel,项目名称:java-algebra-system,代码行数:26,代码来源:ReductionSeq.java

示例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 );
}
 
开发者ID:kredel,项目名称:java-algebra-system,代码行数:33,代码来源:RReductionSeq.java

示例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 );
}
 
开发者ID:kredel,项目名称:java-algebra-system,代码行数:33,代码来源:DReductionSeq.java

示例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;
}
 
开发者ID:kredel,项目名称:java-algebra-system,代码行数:35,代码来源:SigReductionSeq.java

示例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;
}
 
开发者ID:kredel,项目名称:java-algebra-system,代码行数:14,代码来源:ReductionAbstract.java


注:本文中的edu.jas.poly.ExpVector.sum方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。