public interface EnhanceScaleMissing extends IsMissingEvaluator
Implementation rules for missing data. Here "missing data" is a general name for invalid/never written/missing values. Use this interface when you dont need to distinguish these variants. See below for a lower-level interface if you do need to distinguish between them.
Implementation rules for scale/offset (no missing data)
Implementation rules for missing data with scale/offset
Implementation rules for valid_range
Implementation rules for _FillData
Implementation rules for missing_value
Modifier and Type | Method and Description |
---|---|
Array |
convertScaleOffsetMissing(Array data)
Convert data if hasScaleOffset, using scale and offset.
|
double |
convertScaleOffsetMissing(byte value)
Convert this byte value to a double, using scale/offset/missing value if applicable
|
double |
convertScaleOffsetMissing(double value)
Convert this double value using scale/offset/missing value if applicable
|
double |
convertScaleOffsetMissing(int value)
Convert this int value to a double, using scale/offset/missing value if applicable
|
double |
convertScaleOffsetMissing(long value)
Convert this long value to a double, using scale/offset/missing value if applicable
|
double |
convertScaleOffsetMissing(short value)
Convert this short value to a double, using scale/offset/missing value if applicable
|
boolean |
getUseNaNs()
get whether to use NaNs for missing float/double values (for efficiency)
|
double |
getValidMax()
return the maximum value in the valid range
|
double |
getValidMin()
return the minimum value in the valid range
|
boolean |
hasFillValue()
true if Variable has _FillValue attribute
|
boolean |
hasInvalidData()
true if Variable has valid_range, valid_min or valid_max attributes
|
boolean |
hasMissing()
true if Variable has missing data values
|
boolean |
hasMissingValue()
true if Variable has missing_value attribute
|
boolean |
hasScaleOffset()
true if Variable data will be converted using scale and offet
|
boolean |
isFillValue(double val)
return true if val equals the _FillValue
|
boolean |
isInvalidData(double val)
return true if val is outside the valid range
|
boolean |
isMissing(double val)
true if val is a missing data value.
|
boolean |
isMissingFast(double val)
true if val is a missing data value.
|
boolean |
isMissingValue(double val)
return true if val equals a missing_value
|
void |
setFillValueIsMissing(boolean b)
set if _FillValue is considered isMissing(); better set in constructor if possible
|
void |
setInvalidDataIsMissing(boolean b)
set if valid_range is considered isMissing(); better set in constructor if possible
|
void |
setMissingDataIsMissing(boolean b)
set if missing_data is considered isMissing(); better set in constructor if possible
|
void |
setUseNaNs(boolean useNaNs)
set whether to use NaNs for missing float/double values, for efficiency
|
boolean hasMissing()
hasMissing
in interface IsMissingEvaluator
boolean isMissing(double val)
isMissing
in interface IsMissingEvaluator
val
- unpacked valueboolean isMissingFast(double val)
val
- unpacked valueboolean hasInvalidData()
double getValidMin()
double getValidMax()
boolean isInvalidData(double val)
boolean hasFillValue()
boolean isFillValue(double val)
boolean hasMissingValue()
boolean isMissingValue(double val)
void setFillValueIsMissing(boolean b)
void setInvalidDataIsMissing(boolean b)
void setMissingDataIsMissing(boolean b)
void setUseNaNs(boolean useNaNs)
boolean getUseNaNs()
boolean hasScaleOffset()
Array convertScaleOffsetMissing(Array data) throws java.io.IOException
data
- convert thisjava.io.IOException
double convertScaleOffsetMissing(byte value)
double convertScaleOffsetMissing(short value)
double convertScaleOffsetMissing(int value)
double convertScaleOffsetMissing(long value)
double convertScaleOffsetMissing(double value)