Class UncertainDoubleElement
- java.lang.Object
-
- java.lang.Number
-
- org.meeuw.math.uncertainnumbers.AbstractUncertainDouble<UncertainReal>
-
- org.meeuw.math.uncertainnumbers.field.UncertainDoubleElement
-
- All Implemented Interfaces:
Serializable
,Comparable<UncertainReal>
,AdditiveGroupElement<UncertainReal>
,AdditiveMonoidElement<UncertainReal>
,AdditiveSemiGroupElement<UncertainReal>
,AlgebraicElement<UncertainReal>
,CompleteFieldElement<UncertainReal>
,DivisionRingElement<UncertainReal>
,FieldElement<UncertainReal>
,MultiplicativeGroupElement<UncertainReal>
,MultiplicativeMonoidElement<UncertainReal>
,MultiplicativeSemiGroupElement<UncertainReal>
,RingElement<UncertainReal>
,RngElement<UncertainReal>
,ScalarFieldElement<UncertainReal>
,Scalar<UncertainReal>
,SignedNumber
,Sizeable<UncertainReal>
,UncertainReal
,UncertainDouble<UncertainReal>
public class UncertainDoubleElement extends AbstractUncertainDouble<UncertainReal> implements UncertainReal
The most basic implementation of anUncertainReal
. Immutable, based on primitivedouble
s.- Since:
- 0.4
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static UncertainDoubleElement
ONE
static UncertainDoubleElement
ZERO
-
Fields inherited from interface org.meeuw.math.uncertainnumbers.UncertainDouble
EXACT, NaN_EPSILON
-
-
Constructor Summary
Constructors Constructor Description UncertainDoubleElement(double value, double uncertainty)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UncertainDoubleElement
abs()
int
compareTo(Number o)
UncertainDoubleElement
cos()
boolean
equals(Object o)
UncertainRealField
getStructure()
Returns theAlgebraicStructure
associated with the object.double
getValue()
int
hashCode()
UncertainReal
negation()
The additive inverseUncertainDoubleElement
of(double value, double uncertainty)
UncertainDoubleElement
plus(UncertainReal summand)
UncertainDoubleElement
pow(int exponent)
if multiplication and division is defined, then so is exponentiation to any integer power.UncertainDoubleElement
pow(UncertainDoubleElement uncertainDoubleElement)
UncertainReal
pow(UncertainReal exponent)
UncertainDoubleElement
reciprocal()
The multiplicative inverseUncertainDoubleElement
sin()
UncertainDoubleElement
sqrt()
UncertainDoubleElement
times(UncertainReal multiplier)
String
toString()
Represents the mean value in a scientific notation (using unicode characters).-
Methods inherited from class org.meeuw.math.uncertainnumbers.AbstractUncertainDouble
bigDecimalValue, byteValue, compareTo, doubleValue, floatValue, intValue, longValue, shortValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.meeuw.math.abstractalgebra.AdditiveGroupElement
minus, repeatedPlus
-
Methods inherited from interface org.meeuw.math.abstractalgebra.AdditiveSemiGroupElement
p
-
Methods inherited from interface org.meeuw.math.abstractalgebra.MultiplicativeGroupElement
dividedBy
-
Methods inherited from interface org.meeuw.math.abstractalgebra.MultiplicativeSemiGroupElement
sqr, x
-
Methods inherited from interface org.meeuw.math.numbers.Scalar
byteValue, floatValue, gt, gte, intValue, isFinite, isNaN, lt, lte, shortValue
-
Methods inherited from interface org.meeuw.math.numbers.SignedNumber
isNegative, isPositive
-
Methods inherited from interface org.meeuw.math.uncertainnumbers.UncertainDouble
bigDecimalValue, combined, compareTo, dividedBy, doubleValue, equals, getConfidenceInterval, getFractionalUncertainty, getUncertainty, isExact, longValue, minus, operations, plus, signum, times
-
Methods inherited from interface org.meeuw.math.uncertainnumbers.field.UncertainReal
isOne, isZero
-
-
-
-
Field Detail
-
ZERO
public static final UncertainDoubleElement ZERO
-
ONE
public static final UncertainDoubleElement ONE
-
-
Method Detail
-
getStructure
public UncertainRealField getStructure()
Description copied from interface:AlgebraicElement
Returns theAlgebraicStructure
associated with the object.- Specified by:
getStructure
in interfaceAdditiveGroupElement<UncertainReal>
- Specified by:
getStructure
in interfaceAdditiveMonoidElement<UncertainReal>
- Specified by:
getStructure
in interfaceAdditiveSemiGroupElement<UncertainReal>
- Specified by:
getStructure
in interfaceAlgebraicElement<UncertainReal>
- Specified by:
getStructure
in interfaceCompleteFieldElement<UncertainReal>
- Specified by:
getStructure
in interfaceDivisionRingElement<UncertainReal>
- Specified by:
getStructure
in interfaceFieldElement<UncertainReal>
- Specified by:
getStructure
in interfaceMultiplicativeGroupElement<UncertainReal>
- Specified by:
getStructure
in interfaceMultiplicativeMonoidElement<UncertainReal>
- Specified by:
getStructure
in interfaceMultiplicativeSemiGroupElement<UncertainReal>
- Specified by:
getStructure
in interfaceRingElement<UncertainReal>
- Specified by:
getStructure
in interfaceRngElement<UncertainReal>
- Specified by:
getStructure
in interfaceScalarFieldElement<UncertainReal>
-
times
public UncertainDoubleElement times(UncertainReal multiplier)
- Specified by:
times
in interfaceMultiplicativeSemiGroupElement<UncertainReal>
- Specified by:
times
in interfaceUncertainDouble<UncertainReal>
- Specified by:
times
in interfaceUncertainReal
-
plus
public UncertainDoubleElement plus(UncertainReal summand)
- Specified by:
plus
in interfaceAdditiveSemiGroupElement<UncertainReal>
- Specified by:
plus
in interfaceUncertainDouble<UncertainReal>
- Specified by:
plus
in interfaceUncertainReal
- Overrides:
plus
in classAbstractUncertainDouble<UncertainReal>
-
reciprocal
public UncertainDoubleElement reciprocal()
Description copied from interface:MultiplicativeGroupElement
The multiplicative inverse- Specified by:
reciprocal
in interfaceMultiplicativeGroupElement<UncertainReal>
-
negation
public UncertainReal negation()
Description copied from interface:AdditiveGroupElement
The additive inverse- Specified by:
negation
in interfaceAdditiveGroupElement<UncertainReal>
- Specified by:
negation
in interfaceUncertainDouble<UncertainReal>
- Specified by:
negation
in interfaceUncertainReal
-
getValue
public double getValue()
- Specified by:
getValue
in interfaceUncertainDouble<UncertainReal>
-
sqrt
public UncertainDoubleElement sqrt()
- Specified by:
sqrt
in interfaceCompleteFieldElement<UncertainReal>
-
pow
public UncertainDoubleElement pow(UncertainDoubleElement uncertainDoubleElement)
-
sin
public UncertainDoubleElement sin()
- Specified by:
sin
in interfaceCompleteFieldElement<UncertainReal>
-
cos
public UncertainDoubleElement cos()
- Specified by:
cos
in interfaceCompleteFieldElement<UncertainReal>
-
pow
public UncertainReal pow(UncertainReal exponent)
- Specified by:
pow
in interfaceCompleteFieldElement<UncertainReal>
-
pow
public UncertainDoubleElement pow(int exponent)
Description copied from interface:MultiplicativeGroupElement
if multiplication and division is defined, then so is exponentiation to any integer power. This default implementation is doing exponentiation by squaring- Specified by:
pow
in interfaceMultiplicativeGroupElement<UncertainReal>
- Specified by:
pow
in interfaceMultiplicativeMonoidElement<UncertainReal>
- Specified by:
pow
in interfaceMultiplicativeSemiGroupElement<UncertainReal>
- Specified by:
pow
in interfaceUncertainDouble<UncertainReal>
- Specified by:
pow
in interfaceUncertainReal
-
of
public UncertainDoubleElement of(double value, double uncertainty)
- Specified by:
of
in interfaceUncertainDouble<UncertainReal>
-
compareTo
public int compareTo(Number o)
-
abs
public UncertainDoubleElement abs()
- Specified by:
abs
in interfaceSizeable<UncertainReal>
- Specified by:
abs
in interfaceUncertainDouble<UncertainReal>
-
-