/** {@inheritDoc} */ public boolean isLEOrdered(final IExpr obj) { return compareTo(obj) <= 0; }
@Override public IExpr divide(IExpr that) { return this.div(that); }
public ISymbol topHead() { return head(); }
/** * Signum functionality is used in JAS toString() method, don't use it as math * signum function. * * @deprecated */ @Override public int signum() { if (isZERO()) { return 0; } if (isSignedNumber()) { return ((ISignedNumber) this).sign(); } return 1; }
public IExpr opposite() { if (this.isNumber()) { return F.eval(F.Times(F.CN1, this)); } return F.Times(F.CN1, this); }
/** * {@inheritDoc} */ public IExpr replaceSlots(final IAST astSlots) { return this.accept(new VisitorReplaceSlots(astSlots)); }
@Override public boolean isONE() { return isOne(); }
@Override public boolean isZERO() { return isZero(); }
public boolean isSame(IExpr expression) { return isSame(expression, Config.DOUBLE_EPSILON); }
public IExpr inverse() { if (this.isNumber()) { return F.eval(F.Power(this, F.CN1)); } return F.Power(this, F.CN1); }
/** * {@inheritDoc} */ public IExpr replaceAll(final IAST astRules) { return this.accept(new VisitorReplaceAll(astRules)); }
@Override public boolean isUnit() { return isOne(); }
public final IExpr power(final IExpr that) { if (this.isNumber() && that.isNumber()) { return F.eval(F.Power(this, that)); } return F.Power(this, that); }
/** * {@inheritDoc} */ public IExpr replaceAll(final Function<IExpr, IExpr> function) { return this.accept(new VisitorReplaceAll(function)); }
/** {@inheritDoc} */ public boolean isGEOrdered(final IExpr obj) { return compareTo(obj) >= 0; }
/** * {@inheritDoc} */ public IExpr apply(List<? extends IExpr> leaves) { final IAST ast = F.ast(head()); for (int i = 0; i < leaves.size(); i++) { ast.add(leaves.get(i)); } return ast; }
public IExpr times(final IExpr that) { if (this.isNumber() && that.isNumber()) { return F.eval(F.Times(this, that)); } return F.Times(this, that); }
/** * {@inheritDoc} */ public IExpr replacePart(final IAST astRules) { return this.accept(new VisitorReplacePart(astRules)); }
/** {@inheritDoc} */ public boolean isGTOrdered(final IExpr obj) { return compareTo(obj) > 0; }
/** * {@inheritDoc} */ public IExpr apply(IExpr... leaves) { final IAST ast = F.ast(head()); for (int i = 0; i < leaves.length; i++) { ast.add(leaves[i]); } return ast; }