private static double getEuclidDistance ( double[] x
											, double[] y
											, Matrix features) {

		assert(x.length == y.length);
		double distance = 0;
		for (int k = 1; k < x.length; k++) {
		
			if (x[k] == MISSING || y[k] == MISSING) {
				distance += 1;
			}
			else {
				int attributeValues = features.valueCount(k);
				if (attributeValues == 0) {	// attribute is continuous
					double tmp = x[k] - y[k];
					distance += (tmp * tmp);
				}
				else {	// attribute is nominal
					if (x[k] != y[k])
					distance += 1;
				}
			}
		
		}
		
		return distance;
		
	}