public Quality verify()
  {
    double min_lambda = 1; // for center-in-convex-hull check
    double max_overlength = 0; // for all-points-in-ball check
    double min_underlength = 0; // for all-boundary-points-on-boundary
    double ball_error;
    double qr_error = support.representationError();

    // Center really in convex hull?
    support.findAffineCoefficients(center, lambdas);
    for (int k = 0; k < support.size(); ++k)
      if (lambdas[k] <= min_lambda) min_lambda = lambdas[k];

    // All points in ball, all support points really on boundary?
    for (int k = 0; k < S.size(); ++k)
    {

      // Compare center-to-point distance with radius
      for (int i = 0; i < dim; ++i)
        centerToPoint[i] = S.coord(k, i) - center[i];
      double sqDist = 0;
      for (int i = 0; i < dim; ++i)
        sqDist += sqr(centerToPoint[i]);
      ball_error = Math.sqrt(sqDist) - radius;

      // Check for sphere violations
      if (ball_error > max_overlength) max_overlength = ball_error;

      // check for boundary violations
      if (support.isMember(k)) if (ball_error < min_underlength) min_underlength = ball_error;
    }

    return new Quality(qr_error, min_lambda, max_overlength / radius, Math.abs(min_underlength / radius), iteration,
        support.size());
  }