visad
Class ErrorEstimate
- java.lang.Object
-
- visad.ErrorEstimate
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable
public class ErrorEstimate extends java.lang.Object implements java.io.Serializable, java.lang.ComparableErrorEstimate is the immutable VisAD class for statistics about a value or array of values.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ErrorEstimate(double[] value, double error, Unit u)construct an ErrorEstimate for an array of values with an errorErrorEstimate(double[] value, Unit u, int op, ErrorEstimate a, ErrorEstimate b, int error_mode)construct Error for an array of values that is the result of a binary operator; a and b are the ErrorEstimate-s for the operandsErrorEstimate(double[] value, Unit u, int op, ErrorEstimate a, int error_mode)construct Error for an array of values that is the result of a unary operator; a is the ErrorEstimate for the operandErrorEstimate(double error, double mean, long number, Unit u)construct an error distribution of number values with given mean and error (variance), in Unit unit
Note that themeananderrorparameters are reversed in this methodErrorEstimate(double mean, double error, Unit u)construct an error distribution of 1 value with given mean and error (variance), in Unit unitErrorEstimate(double value, Unit u, int op, ErrorEstimate a, ErrorEstimate b, int error_mode)construct an ErrorEstimate for a value that is the result of a binary operator; a and b are the ErrorEstimate-s for the operandsErrorEstimate(double value, Unit u, int op, ErrorEstimate a, int error_mode)construct an ErrorEstimate for a value that is the result of a unary operator; a is the ErrorEstimate for the operandErrorEstimate(ErrorEstimate field_error, ErrorEstimate sample_error, double val, int inc)construct an ErrorEstimate from a Field ErrorEstimate, a sample ErrorEstimate, the sample value, and an increment for NumberNotMissing; used by FlatField.setSampleErrorEstimate(float[] value, double error, Unit u)construct an ErrorEstimate for an array of values with an errorErrorEstimate(float[] value, Unit u, int op, ErrorEstimate a, ErrorEstimate b, int error_mode)construct Error for an array of values that is the result of a binary operator; a and b are the ErrorEstimate-s for the operandsErrorEstimate(float[] value, Unit u, int op, ErrorEstimate a, int error_mode)construct Error for an array of values that is the result of a unary operator; a is the ErrorEstimate for the operand
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompareTo(java.lang.Object obj)Compares this error estimate to another.static ErrorEstimate[]copyErrorsArray(ErrorEstimate[] errors)copy a ErrorEstimate[] array; this is a helper for Set, FlatField, etcdoublegetErrorValue()Get the variance of this error distributiondoublegetMean()Get the mean value for this error distributionlonggetNumberNotMissing()Get the number of values in this error distributionUnitgetUnit()Get the Unit for this error distribution.booleanisMissing()java.lang.StringtoString()
-
-
-
Constructor Detail
-
ErrorEstimate
public ErrorEstimate(double error, double mean, long number, Unit u)construct an error distribution of number values with given mean and error (variance), in Unit unit
Note that themeananderrorparameters are reversed in this method
-
ErrorEstimate
public ErrorEstimate(double mean, double error, Unit u)construct an error distribution of 1 value with given mean and error (variance), in Unit unit
-
ErrorEstimate
public ErrorEstimate(ErrorEstimate field_error, ErrorEstimate sample_error, double val, int inc) throws VisADException
construct an ErrorEstimate from a Field ErrorEstimate, a sample ErrorEstimate, the sample value, and an increment for NumberNotMissing; used by FlatField.setSample- Throws:
VisADException
-
ErrorEstimate
public ErrorEstimate(double value, Unit u, int op, ErrorEstimate a, ErrorEstimate b, int error_mode) throws VisADExceptionconstruct an ErrorEstimate for a value that is the result of a binary operator; a and b are the ErrorEstimate-s for the operands- Throws:
VisADException
-
ErrorEstimate
public ErrorEstimate(double value, Unit u, int op, ErrorEstimate a, int error_mode) throws VisADExceptionconstruct an ErrorEstimate for a value that is the result of a unary operator; a is the ErrorEstimate for the operand- Throws:
VisADException
-
ErrorEstimate
public ErrorEstimate(double[] value, double error, Unit u)construct an ErrorEstimate for an array of values with an error
-
ErrorEstimate
public ErrorEstimate(float[] value, double error, Unit u)construct an ErrorEstimate for an array of values with an error
-
ErrorEstimate
public ErrorEstimate(double[] value, Unit u, int op, ErrorEstimate a, ErrorEstimate b, int error_mode) throws VisADExceptionconstruct Error for an array of values that is the result of a binary operator; a and b are the ErrorEstimate-s for the operands- Throws:
VisADException
-
ErrorEstimate
public ErrorEstimate(float[] value, Unit u, int op, ErrorEstimate a, ErrorEstimate b, int error_mode) throws VisADExceptionconstruct Error for an array of values that is the result of a binary operator; a and b are the ErrorEstimate-s for the operands- Throws:
VisADException
-
ErrorEstimate
public ErrorEstimate(double[] value, Unit u, int op, ErrorEstimate a, int error_mode) throws VisADExceptionconstruct Error for an array of values that is the result of a unary operator; a is the ErrorEstimate for the operand- Throws:
VisADException
-
ErrorEstimate
public ErrorEstimate(float[] value, Unit u, int op, ErrorEstimate a, int error_mode) throws VisADExceptionconstruct Error for an array of values that is the result of a unary operator; a is the ErrorEstimate for the operand- Throws:
VisADException
-
-
Method Detail
-
copyErrorsArray
public static ErrorEstimate[] copyErrorsArray(ErrorEstimate[] errors)
copy a ErrorEstimate[] array; this is a helper for Set, FlatField, etc
-
isMissing
public boolean isMissing()
-
getMean
public double getMean()
Get the mean value for this error distribution
-
getErrorValue
public double getErrorValue()
Get the variance of this error distribution
-
getNumberNotMissing
public long getNumberNotMissing()
Get the number of values in this error distribution
-
getUnit
public Unit getUnit()
Get the Unit for this error distribution.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(java.lang.Object obj)
Compares this error estimate to another.- Specified by:
compareToin interfacejava.lang.Comparable- Parameters:
obj- The other error estimate. May benull.- Returns:
- A negative integer, zero, or a positive integer
depending on whether this ErrorEstimate is
considered less than, equal to, or greater than
the other ErrorEstimate, respectively. If
obj == null, then a positive value is returned. An ErrorEstimate with no unit is considered less than an ErrorEstimate with a unit.
-
-
DMelt 3.0 © DataMelt by jWork.ORG