本文整理汇总了Java中edu.jas.poly.ExpVector.isZERO方法的典型用法代码示例。如果您正苦于以下问题:Java ExpVector.isZERO方法的具体用法?Java ExpVector.isZERO怎么用?Java ExpVector.isZERO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.jas.poly.ExpVector
的用法示例。
在下文中一共展示了ExpVector.isZERO方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepend
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* Prepend a new leading coefficient.
* @param r variable for the direction.
* @param h new coefficient.
* @return new power series.
*/
public MultiVarPowerSeries<C> prepend(final C h, final int r) {
if (r < 0 || ring.nvar < r) {
throw new IllegalArgumentException("variable index out of bound");
}
return new MultiVarPowerSeries<C>(ring, new MultiVarCoefficients<C>(ring) {
@Override
public C generate(ExpVector i) {
if (i.isZERO()) {
return h;
}
ExpVector e = i.subst(r, i.getVal(r) - 1);
if (e.signum() < 0) {
return pfac.coFac.getZERO();
}
return coefficient(e);
}
});
}
示例2: integrate
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* Integrate with respect to variable r and with given constant.
* @param c integration constant.
* @param r variable for the direction.
* @return integrate(this).
*/
public MultiVarPowerSeries<C> integrate(final C c, final int r) {
if (r < 0 || ring.nvar < r) {
throw new IllegalArgumentException("variable index out of bound");
}
int nt = Math.min(ring.truncate, truncate + 1);
return new MultiVarPowerSeries<C>(ring, new MultiVarCoefficients<C>(ring) {
@Override
public C generate(ExpVector i) {
if (i.isZERO()) {
return c;
}
long d = i.getVal(r);
if (d > 0) {
ExpVector e = i.subst(r, d - 1);
C v = coefficient(e);
v = v.divide(ring.coFac.fromInteger(d));
return v;
}
return ring.coFac.getZERO();
}
}, nt);
}
示例3: generators
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* Get a list of the generating elements.
* @return list of generators for the algebraic structure.
* @see edu.jas.structure.ElemFactory#generators()
*/
public List<MultiVarPowerSeries<C>> generators() {
List<C> rgens = coFac.generators();
List<MultiVarPowerSeries<C>> gens = new ArrayList<MultiVarPowerSeries<C>>(rgens.size());
for (final C cg : rgens) {
MultiVarPowerSeries<C> g = new MultiVarPowerSeries<C>(this, new MultiVarCoefficients<C>(this) {
@Override
public C generate(ExpVector i) {
if (i.isZERO()) {
return cg;
}
return coFac.getZERO();
}
});
gens.add(g);
}
for (int i = 0; i < nvar; i++) {
gens.add(ONE.shift(1, nvar - 1 - i));
}
return gens;
}
示例4: multiply
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* LocalSolvablePolynomial left and right multiplication. Product with ring
* element and exponent vector.
* @param b coefficient polynomial.
* @param e exponent.
* @param c coefficient polynomial.
* @param f exponent.
* @return b x<sup>e</sup> * this * c x<sup>f</sup>, where * denotes
* solvable multiplication.
*/
@Override
public LocalSolvablePolynomial<C> multiply(SolvableLocal<C> b, ExpVector e, SolvableLocal<C> c,
ExpVector f) {
if (b == null || b.isZERO()) {
return ring.getZERO();
}
if (c == null || c.isZERO()) {
return ring.getZERO();
}
if (b.isONE() && e.isZERO() && c.isONE() && f.isZERO()) {
return this;
}
LocalSolvablePolynomial<C> Cp = new LocalSolvablePolynomial<C>(ring, b, e);
LocalSolvablePolynomial<C> Dp = new LocalSolvablePolynomial<C>(ring, c, f);
return multiply(Cp, Dp);
}
示例5: fromInteger
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* Get a (constant) MultiVarPowerSeries<C> from a long value.
* @param a long.
* @return a MultiVarPowerSeries<C>.
*/
public MultiVarPowerSeries<C> fromInteger(final long a) {
return new MultiVarPowerSeries<C>(this, new MultiVarCoefficients<C>(this) {
@Override
public C generate(ExpVector i) {
if (i.isZERO()) {
return coFac.fromInteger(a);
}
return coFac.getZERO();
}
});
}
示例6: multiplyLeft
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* LocalSolvablePolynomial multiplication. Left product with exponent
* vector.
* @param e exponent.
* @return x<sup>e</sup> * this, where * denotes solvable multiplication.
*/
@Override
public LocalSolvablePolynomial<C> multiplyLeft(ExpVector e) {
if (e == null || e.isZERO()) {
return this;
}
SolvableLocal<C> b = ring.getONECoefficient();
LocalSolvablePolynomial<C> Cp = new LocalSolvablePolynomial<C>(ring, b, e);
return Cp.multiply(this);
}
示例7: multiply
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* SolvableQuotient multiplication by exponent.
* @param e exponent vector.
* @return this*b.
*/
public SolvableQuotient<C> multiply(ExpVector e) {
if (e == null || e.isZERO()) {
return this;
}
if (num.isZERO()) {
return this;
}
GenSolvablePolynomial<C> n = num.multiply(e);
return new SolvableQuotient<C>(ring, n, den, false);
}
示例8: multiply
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* SolvableLocal multiplication by exponent.
* @param e exponent vector.
* @return this*b.
*/
public SolvableLocal<C> multiply(ExpVector e) {
if (e == null || e.isZERO()) {
return this;
}
if (num.isZERO()) {
return this;
}
GenSolvablePolynomial<C> B = ring.ring.getONE().multiply(e);
return multiply(B);
}
示例9: multiply
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* Local multiplication by exponent.
* @param e exponent vector.
* @return this*b.
*/
public Local<C> multiply(ExpVector e) {
if (e == null || e.isZERO()) {
return this;
}
if (num.isZERO()) {
return this;
}
GenPolynomial<C> n = num.multiply(e);
return new Local<C>(ring, n, den, false);
}
示例10: multiply
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* ResidueSolvableWordPolynomial left and right multiplication. Product with
* exponent vector.
* @param e exponent.
* @param f exponent.
* @return x<sup>e</sup> * this * x<sup>f</sup>, where * denotes solvable
* multiplication.
*/
@Override
public ResidueSolvableWordPolynomial<C> multiply(ExpVector e, ExpVector f) {
if (e == null || e.isZERO()) {
return this;
}
if (f == null || f.isZERO()) {
return this;
}
WordResidue<C> b = ring.getONECoefficient();
return multiply(b, e, b, f);
}
示例11: multiplyLeft
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* ResidueSolvableWordPolynomial multiplication. Left product with exponent
* vector.
* @param e exponent.
* @return x<sup>e</sup> * this, where * denotes solvable multiplication.
*/
@Override
public ResidueSolvableWordPolynomial<C> multiplyLeft(ExpVector e) {
if (e == null || e.isZERO()) {
return this;
}
ResidueSolvableWordPolynomial<C> Cp = ring.valueOf(e);
return Cp.multiply(this);
}
示例12: multiply
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* SolvableLocalResidue multiplication by exponent.
* @param e exponent vector.
* @return this*b.
*/
public SolvableLocalResidue<C> multiply(ExpVector e) {
if (e == null || e.isZERO()) {
return this;
}
if (num.isZERO()) {
return this;
}
GenSolvablePolynomial<C> B = ring.ring.getONE().multiply(e);
return multiply(B);
}
示例13: multiply
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* SolvableResidue multiplication.
* @param e exponent.
* @return this*X<sup>e</sup>.
*/
public SolvableResidue<C> multiply(ExpVector e) {
GenSolvablePolynomial<C> x = val.multiply(e);
int i = -1;
if (isunit == 1 && e.isZERO()) {
i = 1;
} else if (isunit == 0 || !e.isZERO()) {
i = 0;
}
return new SolvableResidue<C>(ring, x, i);
}
示例14: multiply
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* ResidueSolvablePolynomial left and right multiplication. Product with
* exponent vector.
* @param e exponent.
* @param f exponent.
* @return x<sup>e</sup> * this * x<sup>f</sup>, where * denotes solvable
* multiplication.
*/
@Override
public ResidueSolvablePolynomial<C> multiply(ExpVector e, ExpVector f) {
if (e == null || e.isZERO()) {
return this;
}
if (f == null || f.isZERO()) {
return this;
}
SolvableResidue<C> b = ring.getONECoefficient();
return multiply(b, e, b, f);
}
示例15: multiplyLeft
import edu.jas.poly.ExpVector; //导入方法依赖的package包/类
/**
* ResidueSolvablePolynomial multiplication. Left product with exponent
* vector.
* @param e exponent.
* @return x<sup>e</sup> * this, where * denotes solvable multiplication.
*/
@Override
public ResidueSolvablePolynomial<C> multiplyLeft(ExpVector e) {
if (e == null || e.isZERO()) {
return this;
}
SolvableResidue<C> b = ring.getONECoefficient();
ResidueSolvablePolynomial<C> Cp = new ResidueSolvablePolynomial<C>(ring, b, e);
return Cp.multiply(this);
}