public static double rmsdMin(Point3d[] x, Point3d[] y) {

		if (x.length != y.length) {
			throw new IllegalArgumentException(
					"Point arrays are not of the same length.");
		}

		double sum = 0.0;
		for (int i = 0; i < x.length; i++) {
			double minDist = Double.MAX_VALUE;
			for (int j = 0; j < y.length; j++) {
				minDist = Math.min(minDist, x[i].distanceSquared(y[j]));
			}
			sum += minDist;
		}
		return Math.sqrt(sum / x.length);
	}
public static double rmsdMin ( Point3d [ ] x , Point3d [ ] y ) { if ( x . length != y . length ) { throw new IllegalArgumentException ( "Point arrays are not of the same length." ) ; } double sum = 0.0 ; for ( int i = 0 ; i < x . length ; i ++ ) { double minDist = Double . MAX_VALUE ; for ( int j = 0 ; j < y . length ; j ++ ) { minDist = Math . min ( minDist , x [ i ] . distanceSquared ( y [ j ] ) ) ; } sum += minDist ; } return Math . sqrt ( sum / x . length ) ; }
/*
Needs documentation!

@param x

@param y

@return