public ShortReferenceArray restriction(region r) { dist dist = distribution.restriction(r); ShortArray ret = newInstance(dist, (short)0); place here = x10.lang.Runtime.runtime.currentPlace(); try { for (Iterator it = dist.iterator(); it.hasNext(); ) { point p = (point) it.next(); place pl = dist.get(p); x10.lang.Runtime.runtime.setCurrentPlace(pl); ret.set(get(p), p); } } finally { x10.lang.Runtime.runtime.setCurrentPlace(here); } return ret;
public ShortReferenceArray restriction(dist d) { return restriction(d.region);
	public ShortReferenceArray restriction(region r) {		dist dist = distribution.restriction(r);		ShortArray ret = newInstance(dist, (short)0);		place here = x10.lang.Runtime.runtime.currentPlace();		try {			for (Iterator it = dist.iterator(); it.hasNext(); ) {				point p = (point) it.next();				place pl = dist.get(p);				x10.lang.Runtime.runtime.setCurrentPlace(pl);				ret.set(get(p), p);			}		} finally {			x10.lang.Runtime.runtime.setCurrentPlace(here);		}		return ret;	}