public static int ordinal(dist d,int d0,int d1){ int index; region r = d.region; assert (r.rank == 2); if (performBoundsCheck) checkBounds(r,d0,d1); try { if(!r.isConvex()){ index = r.ordinal(x10.array.point_c.factory.point(d0,d1)); } else { d0 -= r.rank(0).low(); d1 -= r.rank(1).low();  index = d1+ d0*r.rank(1).size(); if(simpleRangeCheck) rangeCheck(r,index); } } catch (UnsupportedOperationException e) { throw new ArrayIndexOutOfBoundsException(); }  return index;
public static int ordinal(dist d,int d0){ region r = d.region; int index; assert (r.rank == 1); if(performBoundsCheck) checkBounds(r,d0); try { if(!r.isConvex()){ index = r.ordinal(x10.array.point_c.factory.point(d0)); } else { index = d0 - r.rank(0).low(); if (simpleRangeCheck) rangeCheck(r,index); } } catch (UnsupportedOperationException e) { throw new ArrayIndexOutOfBoundsException(); }  return index;
	 public static int ordinal(dist d,int d0,int d1){	    int index;	    region r = d.region;	    assert (r.rank == 2);	    if (performBoundsCheck) checkBounds(r,d0,d1);	    try {	    	if(!r.isConvex()){	    		index = r.ordinal(x10.array.point_c.factory.point(d0,d1));	    	}	    	else {	    		d0 -= r.rank(0).low();	    		d1 -= r.rank(1).low();	    			    		index = d1+ d0*r.rank(1).size();	    		if(simpleRangeCheck) rangeCheck(r,index);	    	}	    } catch (UnsupportedOperationException e) {	        throw new ArrayIndexOutOfBoundsException();	    }	   	    return index;	}