Package jscl.math
Class JSCLInteger
- java.lang.Object
-
- jscl.math.Generic
-
- jscl.math.JSCLInteger
-
- All Implemented Interfaces:
java.lang.Comparable,jscl.editor.rendering.MathObject,Arithmetic
- Direct Known Subclasses:
ModularInteger
public class JSCLInteger extends Generic
-
-
Field Summary
Fields Modifier and Type Field Description static JSCLIntegerfactory
-
Constructor Summary
Constructors Constructor Description JSCLInteger(java.math.BigInteger content)
-
Method Summary
-
Methods inherited from class jscl.math.Generic
abs, add, booleanValue, compareTo, divide, equals, gcdAndNormalize, inverse, isIdentity, isOne, isZero, multiply, normalize, pow, scm, subtract, vectorValue
-
-
-
-
Field Detail
-
factory
public static final JSCLInteger factory
-
-
Method Detail
-
content
public java.math.BigInteger content()
-
add
public JSCLInteger add(JSCLInteger integer)
-
subtract
public JSCLInteger subtract(JSCLInteger integer)
-
multiply
public JSCLInteger multiply(JSCLInteger integer)
-
multiple
public boolean multiple(Generic generic) throws java.lang.ArithmeticException
-
integerDivide
public JSCLInteger integerDivide(JSCLInteger integer) throws java.lang.ArithmeticException
- Throws:
java.lang.ArithmeticException
-
divideAndRemainder
public JSCLInteger[] divideAndRemainder(JSCLInteger integer) throws java.lang.ArithmeticException
- Throws:
java.lang.ArithmeticException
-
divideAndRemainder
public Generic[] divideAndRemainder(Generic generic) throws java.lang.ArithmeticException
- Overrides:
divideAndRemainderin classGeneric- Throws:
java.lang.ArithmeticException
-
remainder
public JSCLInteger remainder(JSCLInteger integer) throws java.lang.ArithmeticException
- Throws:
java.lang.ArithmeticException
-
gcd
public JSCLInteger gcd(JSCLInteger integer)
-
gcd
public JSCLInteger gcd()
-
pow
public JSCLInteger pow(int exponent)
-
negate
public JSCLInteger negate()
-
factorial
public JSCLInteger factorial()
-
factorial
public JSCLInteger factorial(int k)
-
mod
public JSCLInteger mod(JSCLInteger integer)
-
modPow
public JSCLInteger modPow(JSCLInteger exponent, JSCLInteger integer)
-
modInverse
public JSCLInteger modInverse(JSCLInteger integer)
-
phi
public JSCLInteger phi()
-
primitiveRoots
public JSCLInteger[] primitiveRoots()
-
sqrt
public JSCLInteger sqrt()
-
nthrt
public JSCLInteger nthrt(int n)
-
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
-
valueof
public JSCLInteger valueof(Generic generic)
-
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
-
intValue
public int intValue()
-
compareTo
public int compareTo(JSCLInteger integer)
-
valueOf
public static JSCLInteger valueOf(long val)
-
valueOf
public static JSCLInteger valueOf(java.lang.String str)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toMathML
public java.lang.String toMathML()
-
newinstance
protected JSCLInteger newinstance(java.math.BigInteger content)
-
-