public void update(TableRow row) { int idx = var.getIndex(); if (type == Table.INT) { int value = row.getInt(idx); mini = Math.min(mini, value); maxi = Math.max(maxi, value); } else if (type == Table.LONG) { long value = row.getLong(idx); minl = Math.min(minl, value); maxl = Math.max(maxl, value); } else if (type == Table.FLOAT) { float value = row.getFloat(idx); minf = Math.min(minf, value); maxf = Math.max(maxf, value); } else if (type == Table.DOUBLE) { double value = row.getDouble(idx); mind = Math.min(mind, value); maxd = Math.max(maxd, value); } }
protected double getWeightImpl(TableRow row) { if (type == Table.INT) { return row.getInt(index) ; } else if (type == Table.LONG) { return row.getLong(index); } else if (type == Table.FLOAT) { return row.getFloat(index); } else if (type == Table.DOUBLE) { return row.getDouble(index); } else { return 1d; } }
field.setDouble(item, row.getDouble(name));
break; case DOUBLE: output.writeDouble(row.getDouble(col)); break; case CATEGORY:
break; case DOUBLE: output.writeDouble(row.getDouble(col)); break; case CATEGORY:
field.setDouble(item, row.getDouble(name));
public boolean inside(TableRow row) { int idx = var.getIndex(); if (type == Table.INT) { int v = row.getInt(idx); return mini <= v && v <= maxi; } else if (type == Table.LONG) { long v = row.getLong(idx); return minl <= v && v <= maxl; } else if (type == Table.FLOAT) { float v = row.getFloat(idx); return minf <= v && v <= maxf; } else if (type == Table.DOUBLE) { double v = row.getDouble(idx); return mind <= v && v <= maxd; } else { return false; } }
public boolean missing(TableRow row) { boolean miss = true; if (type == Table.INT) { int value = row.getInt(index); miss = value == MISSING_INT || specialValue(value); } else if (type == Table.LONG) { long value = row.getLong(index); miss = value == MISSING_LONG || specialValue(value); } else if (type == Table.FLOAT) { float value = row.getFloat(index); miss = value == MISSING_FLOAT || specialValue(value); } else if (type == Table.DOUBLE) { double value = row.getDouble(index); miss = value == MISSING_DOUBLE || specialValue(value); } return miss; }
break; case DOUBLE: setDouble(row, col, source.getDouble(col)); break; case STRING:
value = fvalue; } else if (type == Table.DOUBLE) { double dvalue = row.getDouble(index); if (value == MISSING_DOUBLE || specialValue(dvalue)) return -1; value = dvalue;
public String formatValue(TableRow row) { if (type == Table.INT) { int value = row.getInt(index); if (value == MISSING_INT || specialValue(value)) return "missing"; return Numbers.nfc(value); } else if (type == Table.LONG) { long value = row.getLong(index); if (value == MISSING_LONG || specialValue(value)) return "missing"; return Numbers.nfc(value); } else if (type == Table.FLOAT) { float value = row.getFloat(index); if (value == MISSING_FLOAT || specialValue(value)) return "missing"; return Numbers.nfc(value, 2); } else if (type == Table.DOUBLE) { double value = row.getDouble(index); if (value == MISSING_DOUBLE || specialValue(value)) return "missing"; return Numbers.nfc(value, 2); } else { return ""; } }
break; case DOUBLE: setDouble(row, col, source.getDouble(col)); break; case STRING: