public SombieUMatrix getUMatrix() {
	SombieUMatrix sum = new SombieUMatrix();
	sum.values = getDistances();
	
	double mx = Double.MIN_VALUE;
	double mn = Double.MAX_VALUE;
	for (int i=0; i<sum.values.length; i++) {
	    for (int j=0; j<sum.values[0].length; j++) {
		double v = sum.values[i][j];
		if (v<0) continue;
		if (v>mx) {
		    mx = v;
		    sum.mxc = i;
		    sum.mxr = j;
		}
		if (v<mn) {
		    mn = v;
		    sum.mnc = i;
		    sum.mnr = j;
		}
	    }
	}
	
	sum.maxval = mx;
	sum.minval = mn;
	
	return sum;
    }