public void Compute(double[][] data, int[] labels)
{
if (data == null)
throw new ArgumentNullException("data");
if (labels == null)
throw new ArgumentNullException("labels");
if (data.Length != labels.Length)
throw new DimensionMismatchException("labels",
"The labels array should have the same length as the data array.");
for (int i = 0; i < data.Length; i++)
if (data[i].Length != 2)
throw new DimensionMismatchException("data", "The matrix should have two columns.");
compute(data, labels);
}