jscl.math.operator.FactorOf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jscl Show documentation
Show all versions of jscl Show documentation
java symbolic computing library and mathematical editor
The newest version!
package jscl.math.operator;
import jscl.math.Generic;
import jscl.math.JSCLBoolean;
import jscl.math.Variable;
public class FactorOf extends Operator {
public FactorOf(Generic expression1, Generic expression2) {
super("factorof",new Generic[] {expression1,expression2});
}
public Generic compute() {
try {
return JSCLBoolean.valueOf(parameter[1].multiple(parameter[0]));
} catch (ArithmeticException e) {}
return expressionValue();
}
protected Variable newinstance() {
return new FactorOf(null,null);
}
}