visad
Interface RealIface
-
- All Superinterfaces:
- Data, ScalarIface, Thing
public interface RealIface extends ScalarIface
Interface to scalar data for real numbers represented as double precision floating point values. Double.NaN is used to indicate missing values, because it has the appropriate arithmetic semantics.
-
-
Field Summary
-
Fields inherited from interface visad.Data
ABS, ACOS, ACOS_DEGREES, ADD, ASIN, ASIN_DEGREES, ATAN, ATAN_DEGREES, ATAN2, ATAN2_DEGREES, CEIL, COS, COS_DEGREES, DEGREES_TO_RADIANS, DEPENDENT, DIVIDE, EXP, FLOOR, INDEPENDENT, INV_ATAN2, INV_ATAN2_DEGREES, INV_DIVIDE, INV_POW, INV_REMAINDER, INV_SUBTRACT, LOG, MAX, MIN, MULTIPLY, NEAREST_NEIGHBOR, NEGATE, NO_ERRORS, NOP, POW, RADIANS_TO_DEGREES, REMAINDER, RINT, ROUND, SIN, SIN_DEGREES, SQRT, SUBTRACT, TAN, TAN_DEGREES, WEIGHTED_AVERAGE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description DataadjustSamplingError(Data error, int error_mode)Returns a clone, except that the ErrorEstimate of the clone is adjusted for a given error mode and uncertainty.RealcloneButUnit(Unit u)Returns a clone of this instance but with a new Unit.RealcloneButValue(double value)Returns a clone of this instance with a different numeric value.intcompareTo(java.lang.Object object)Compares this Real to another.ErrorEstimategetError()Returns the uncertainty in the numeric value of this instance.UnitgetUnit()Returns the unit of this instance.doublegetValue()Returns the numeric value in the unit ofgetUnit().doublegetValue(Unit unit_out)Returns the numeric value in a particular unit.inthashCode()Returns the hash code of this Real.java.lang.StringtoString()java.lang.StringtoValueString()Returns a string that represents just the value portion of this Real -- but with full semantics (e.g.-
Methods inherited from interface visad.ScalarIface
equals
-
Methods inherited from interface visad.Data
abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, isMissing, local, log, log, longString, longString, max, max, min, min, multiply, multiply, negate, negate, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary, unary
-
Methods inherited from interface visad.Thing
addReference, removeReference
-
-
-
-
Method Detail
-
getValue
double getValue()
Returns the numeric value in the unit ofgetUnit().- Returns:
- The numeric value in the unit of
getUnit().
-
getValue
double getValue(Unit unit_out) throws VisADException
Returns the numeric value in a particular unit.- Parameters:
unit_out- The desired unit for the numeric value. Must be convertible withgetUnit().- Returns:
- The numeric value in the given unit.
- Throws:
VisADException
-
getUnit
Unit getUnit()
Returns the unit of this instance.- Returns:
- The unit of this instance.
-
getError
ErrorEstimate getError()
Returns the uncertainty in the numeric value of this instance.- Returns:
- The uncertainty in the numeric value of this instance.
-
adjustSamplingError
Data adjustSamplingError(Data error, int error_mode) throws VisADException, java.rmi.RemoteException
Returns a clone, except that the ErrorEstimate of the clone is adjusted for a given error mode and uncertainty.- Specified by:
adjustSamplingErrorin interfaceData- Parameters:
error- The uncertainty by which to adjust the clone.error_mode- The mode for propagating errors. SeeData.- Returns:
- A clone of this instance with a modified uncertainty.
- Throws:
VisADException- VisAD failure.java.rmi.RemoteException- Java RMI failure.
-
cloneButValue
Real cloneButValue(double value) throws VisADException
Returns a clone of this instance with a different numeric value. The unit is unchanged.- Parameters:
value- The numeric value for the clone.- Returns:
- A clone of this nstance with the given numeric value.
- Throws:
VisADException- VisAD failure.
-
cloneButUnit
Real cloneButUnit(Unit u) throws VisADException
Returns a clone of this instance but with a new Unit. The numeric value is unchanged.- Parameters:
u- The unit for the clone.- Returns:
- A clone of this instance but with the given unit.
- Throws:
VisADException
-
toString
java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toValueString
java.lang.String toValueString()
Returns a string that represents just the value portion of this Real -- but with full semantics (e.g. numeric value and unit).- Returns:
- A string representation of just the value portion of this Real.
-
compareTo
int compareTo(java.lang.Object object)
Compares this Real to another.- Parameters:
object- The other Real to compare against. It shall be a Real with a compatible (i.e. convertible) unit.- Returns:
- A negative integer, zero, or a positive integer
depending on whether this Real is considered
less than, equal to, or greater than the other
Real, respectively. If the values of the Real-s
in the default unit are equal, then the
ErrorEstimate.compareTo()method is used to break the tie.
-
hashCode
int hashCode()
Returns the hash code of this Real.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code of this Real. If two Real-s are semantically identical, then their hash codes are equal.
-
-
DMelt 3.0 © DataMelt by jWork.ORG