@Override public double getDouble(int i) { int j = index.getInt(i); assert Utils.check(j > 0); if (j > vsize) { return RDouble.NA; } else { return value.getDouble(j - 1); } }
@Override public boolean dependsOn(RAny v) { return value.dependsOn(v) || index.dependsOn(v); }
@Override public void ref() { value.ref(); index.ref(); }
@Override public boolean isSharedReal() { return value.isShared() || index.isShared(); }
public RDoubleSubset(RDouble value, RInt index) { this.value = value; this.index = index; this.isize = index.size(); this.vsize = value.size(); }