Beispiel #1
0
 /**
  * Convert (in place) all values in the given array that are considered as "missing" to Float.NaN,
  * according to isMissingData(val).
  *
  * @param values input array
  * @return input array, with missing values converted to NaNs.
  */
 public float[] setMissingToNaN(float[] values) {
   if (!vs.hasMissing()) return values;
   final int length = values.length;
   for (int i = 0; i < length; i++) {
     double value = values[i];
     if (vs.isMissing(value)) values[i] = Float.NaN;
   }
   return values;
 }
Beispiel #2
0
 /** true if there may be missing data, see VariableDS.hasMissing() */
 public boolean hasMissingData() {
   return vs.hasMissing();
 }