Class AbstractQuantityStatisticPredicate<S>
- java.lang.Object
-
- org.tensorics.core.scalar.lang.ScalarSupport<S>
-
- org.tensorics.core.quantity.conditions.AbstractQuantityStatisticPredicate<S>
-
- Type Parameters:
S
- the value type
- All Implemented Interfaces:
java.io.Serializable
,BasicOperationSupport<S>
,BinaryFunction<QuantifiedValue<S>,java.lang.Boolean>
,BinaryPredicate<QuantifiedValue<S>>
- Direct Known Subclasses:
QuantityGreaterPredicate
,QuantityLessPredicate
public abstract class AbstractQuantityStatisticPredicate<S> extends ScalarSupport<S> implements BinaryPredicate<QuantifiedValue<S>>, java.io.Serializable
Base class for quantity conditions based on statistical tests. This class provides utility methods to implementations for doing calculations and statistics based on the values (mean) and the errors of quantities.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected QuantityEnvironment<S>
mathsEnvironment
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractQuantityStatisticPredicate(QuantityEnvironment<S> environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
protected S
inverseGaussianCumulativeDistributionFunction(S value)
Evaluate the inverse Gaussian Cumulative Distribution Function and return the result as an element of the backing field.protected QuantifiedValue<S>
subtractQuantities(QuantifiedValue<S> left, QuantifiedValue<S> right)
Calculates the difference of two quantities (including error propagation)java.lang.String
toString()
protected S
zTestValueForDifference(QuantifiedValue<S> left, QuantifiedValue<S> right)
Calculate the z-test z value for the difference of the two values (number of sigmas the difference of the mean values is away from zero)-
Methods inherited from class org.tensorics.core.scalar.lang.ScalarSupport
absoluteValueOf, calculate, countOf, field, inverseOf, negativeOf, one, squareOf, squareRootOf, testIf, two, zero
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.tensorics.core.math.predicates.BinaryPredicate
perform, test
-
-
-
-
Field Detail
-
mathsEnvironment
protected final QuantityEnvironment<S> mathsEnvironment
-
-
Constructor Detail
-
AbstractQuantityStatisticPredicate
protected AbstractQuantityStatisticPredicate(QuantityEnvironment<S> environment)
-
-
Method Detail
-
inverseGaussianCumulativeDistributionFunction
protected S inverseGaussianCumulativeDistributionFunction(S value)
Evaluate the inverse Gaussian Cumulative Distribution Function and return the result as an element of the backing field. This method usesCheating
for the time being.- Parameters:
value
-- Returns:
-
subtractQuantities
protected QuantifiedValue<S> subtractQuantities(QuantifiedValue<S> left, QuantifiedValue<S> right)
Calculates the difference of two quantities (including error propagation)- Parameters:
left
- left operandright
- right operand- Returns:
- the difference as a quantity
-
zTestValueForDifference
protected S zTestValueForDifference(QuantifiedValue<S> left, QuantifiedValue<S> right)
Calculate the z-test z value for the difference of the two values (number of sigmas the difference of the mean values is away from zero)- Parameters:
left
- the left operandright
- the right operand- Returns:
- the z value
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-