Package jscl.math
Class Rational
- java.lang.Object
-
- jscl.math.Generic
-
- jscl.math.Rational
-
- All Implemented Interfaces:
java.lang.Comparable,jscl.editor.rendering.MathObject,Arithmetic,Field
public final class Rational extends Generic implements Field
-
-
Constructor Summary
Constructors Constructor Description Rational(java.math.BigInteger numerator, java.math.BigInteger denominator)
-
Method Summary
-
Methods inherited from class jscl.math.Generic
abs, add, booleanValue, compareTo, divide, divideAndRemainder, equals, gcdAndNormalize, isIdentity, isOne, isZero, multiple, multiply, normalize, pow, remainder, scm, subtract, subtract, vectorValue
-
-
-
-
Field Detail
-
factory
public static final Rational factory
-
-
Method Detail
-
numerator
public java.math.BigInteger numerator()
-
denominator
public java.math.BigInteger denominator()
-
antiderivative
public Generic antiderivative(Variable variable) throws NotIntegrableException
- Specified by:
antiderivativein classGeneric- Throws:
NotIntegrableException
-
derivative
public Generic derivative(Variable variable)
- Specified by:
derivativein classGeneric
-
substitute
public Generic substitute(Variable variable, Generic generic)
- Specified by:
substitutein classGeneric
-
elementary
public Generic elementary()
- Specified by:
elementaryin classGeneric
-
productValue
public Generic[] productValue() throws NotProductException
- Specified by:
productValuein classGeneric- Throws:
NotProductException
-
powerValue
public Power powerValue() throws NotPowerException
- Specified by:
powerValuein classGeneric- Throws:
NotPowerException
-
expressionValue
public Expression expressionValue() throws NotExpressionException
- Specified by:
expressionValuein classGeneric- Throws:
NotExpressionException
-
integerValue
public JSCLInteger integerValue() throws NotIntegerException
- Specified by:
integerValuein classGeneric- Throws:
NotIntegerException
-
variableValue
public Variable variableValue() throws NotVariableException
- Specified by:
variableValuein classGeneric- Throws:
NotVariableException
-
isPolynomial
public boolean isPolynomial(Variable variable)
- Specified by:
isPolynomialin classGeneric
-
isConstant
public boolean isConstant(Variable variable)
- Specified by:
isConstantin classGeneric
-
compareTo
public int compareTo(Rational rational)
-
valueOf
public static Rational valueOf(long n, long d)
-
valueOf
public static Rational valueOf(java.lang.String n, java.lang.String d)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-