public void Compute(double[] x, double[] y, int[] labels)
{
if (x == null)
throw new ArgumentNullException("x");
if (y == null)
throw new ArgumentNullException("y");
if (labels == null)
throw new ArgumentNullException("labels");
if (x.Length != y.Length)
throw new DimensionMismatchException("y", "The x and y arrays should have the same length");
if (x.Length != labels.Length)
throw new DimensionMismatchException("labels",
"The labels array should have the same length as the data array.");
initialize(x, y, labels);
}