// implements BitMatrix persistable sclass PointSetBitMatrix extends AbstractMatrix { new Set points; *(int *w, int *h) {} *(int *w, int *h, Set *points) {} public Bool get(int x, int y) { ret points.contains(pt(x, y)); } public void set(int x, int y, Bool a) { points.add(pt(x, y)); } int nSetBits() { ret points.size(); } }