public override void CholeskyFactor(double[] a, int order) { if (a == null) { throw new ArgumentNullException("a"); } if (order < 1) { throw new ArgumentException(Resources.ArgumentMustBePositive, "order"); } if (a.Length != order * order) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "a"); } var info = SafeNativeMethods.d_cholesky_factor(order, a); if (info > 0) { throw new ArgumentException(Resources.ArgumentMatrixPositiveDefinite); } }