public static RInt double2int( RDouble value, ConversionStatus warn) { // eager to keep error semantics eager int size = value.size(); int[] content = new int[size]; for (int i = 0; i < size; i++) { double d = value.getDouble(i); content[i] = Convert.double2int(d, warn); } return RInt.RIntFactory.getFor(content, value.dimensions(), value.names()); }
@Override public int getInt(int i) { return Convert.double2int(orig.getDouble(i)); }