public class BigDecimalField extends GenericField<java.math.BigDecimal>
| Constructor and Description |
|---|
BigDecimalField(java.math.MathContext mc) |
| Modifier and Type | Method and Description |
|---|---|
java.math.BigDecimal |
addG(java.math.BigDecimal l,
java.math.BigDecimal r)
Adds two elements of type E.
|
java.math.BigDecimal |
cast(java.lang.Object l)
Convert the input to type E.
|
java.lang.Integer |
cmpG(java.math.BigDecimal l,
java.math.BigDecimal r)
Compare two objects of the same type.
|
java.math.BigDecimal |
convertFromInt(java.lang.Integer l)
Attempt to convert argument from an integer
|
java.lang.Integer |
convertToIntE(java.math.BigDecimal l)
If possible convert the argument to an Integer to enable integral powers.
|
java.math.BigDecimal |
divG(java.math.BigDecimal l,
java.math.BigDecimal r)
Divides two elements of type E.
|
java.math.BigDecimal |
getOne()
Get the multiplicative identity for this field.
|
java.math.BigDecimal |
getZero()
Get the additive identity for this field
|
java.math.BigDecimal |
modG(java.math.BigDecimal l,
java.math.BigDecimal r)
Modulus of two elements of type E.
|
java.math.BigDecimal |
mulG(java.math.BigDecimal l,
java.math.BigDecimal r)
Multiplies two elements of type E.
|
java.math.BigDecimal |
negG(java.math.BigDecimal l)
Negates an elements of type E.
|
java.math.BigDecimal |
powG(java.math.BigDecimal l,
java.math.BigDecimal r)
Only integral values are allowed.
|
java.math.BigDecimal |
subG(java.math.BigDecimal l,
java.math.BigDecimal r)
Subtracts two elements of type E.
|
add, and, cmp, convertToInt, div, mod, mul, neg, not, or, pow, subpublic BigDecimalField(java.math.MathContext mc)
mc - public java.math.BigDecimal cast(java.lang.Object l)
GenericFieldcast in class GenericField<java.math.BigDecimal>public java.math.BigDecimal addG(java.math.BigDecimal l,
java.math.BigDecimal r)
throws EvaluationException
GenericFieldaddG in class GenericField<java.math.BigDecimal>l - lhs argumentr - rhs argumentEvaluationException - on errorpublic java.math.BigDecimal subG(java.math.BigDecimal l,
java.math.BigDecimal r)
throws EvaluationException
GenericFieldsubG in class GenericField<java.math.BigDecimal>l - lhs argumentr - rhs argumentEvaluationException - on errorpublic java.math.BigDecimal negG(java.math.BigDecimal l)
throws EvaluationException
GenericFieldnegG in class GenericField<java.math.BigDecimal>l - the argumentEvaluationException - on errorpublic java.math.BigDecimal mulG(java.math.BigDecimal l,
java.math.BigDecimal r)
throws EvaluationException
GenericFieldmulG in class GenericField<java.math.BigDecimal>l - lhs argumentr - rhs argumentEvaluationException - on errorpublic java.math.BigDecimal divG(java.math.BigDecimal l,
java.math.BigDecimal r)
throws EvaluationException
GenericFielddivG in class GenericField<java.math.BigDecimal>l - numeratorr - denominatorEvaluationException - on errorpublic java.math.BigDecimal modG(java.math.BigDecimal l,
java.math.BigDecimal r)
throws EvaluationException
GenericFieldmodG in class GenericField<java.math.BigDecimal>l - lhs argumentr - rhs argumentEvaluationException - on errorpublic java.math.BigDecimal powG(java.math.BigDecimal l,
java.math.BigDecimal r)
throws EvaluationException
powG in class GenericField<java.math.BigDecimal>l - lhs argumentr - rhs argumentEvaluationException - for non integral values.public java.lang.Integer cmpG(java.math.BigDecimal l,
java.math.BigDecimal r)
throws EvaluationException
GenericFieldcmpG in class GenericField<java.math.BigDecimal>l - left argumentr - right argumentEvaluationExceptionpublic java.math.BigDecimal getOne()
FieldIgetOne in interface FieldIgetOne in class GenericField<java.math.BigDecimal>public java.math.BigDecimal getZero()
FieldIgetZero in interface FieldIgetZero in class GenericField<java.math.BigDecimal>public java.math.BigDecimal convertFromInt(java.lang.Integer l)
throws EvaluationException
IntegerConvertorconvertFromInt in interface IntegerConvertorconvertFromInt in class GenericField<java.math.BigDecimal>l - value to convertEvaluationExceptionpublic java.lang.Integer convertToIntE(java.math.BigDecimal l)
throws EvaluationException
GenericFieldpowG(E,E)
method will be called.convertToIntE in class GenericField<java.math.BigDecimal>l - argument to convert.EvaluationExceptionCopyright © 2018 Singular Systems http://www.singularsys.com/jep