|
|
|
@ -256,6 +256,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double.Factorization |
|
|
|
/// Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
|
|
|
|
/// Auto. Comp., Vol.ii-Linear Algebra, and the corresponding
|
|
|
|
/// Fortran subroutine in EISPACK.</remarks>
|
|
|
|
/// <exception cref="NonConvergenceException"></exception>
|
|
|
|
internal static void SymmetricDiagonalize(double[] a, double[] d, double[] e, int order) |
|
|
|
{ |
|
|
|
const int maxiter = 1000; |
|
|
|
@ -354,7 +355,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double.Factorization |
|
|
|
// throw exception that Convergence Failed
|
|
|
|
if (iter >= maxiter) |
|
|
|
{ |
|
|
|
throw new ArgumentException(Resources.ConvergenceFailed); |
|
|
|
throw new NonConvergenceException(); |
|
|
|
} |
|
|
|
} while (Math.Abs(e[l]) > eps*tst1); |
|
|
|
} |
|
|
|
@ -528,6 +529,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double.Factorization |
|
|
|
/// by Martin and Wilkinson, Handbook for Auto. Comp.,
|
|
|
|
/// Vol.ii-Linear Algebra, and the corresponding
|
|
|
|
/// Fortran subroutine in EISPACK.</remarks>
|
|
|
|
/// <exception cref="NonConvergenceException"></exception>
|
|
|
|
internal static void NonsymmetricReduceHessenberToRealSchur(double[] a, double[] matrixH, double[] d, double[] e, int order) |
|
|
|
{ |
|
|
|
// Initialize
|
|
|
|
@ -732,7 +734,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double.Factorization |
|
|
|
iter = iter + 1; |
|
|
|
if (iter >= 30*order) |
|
|
|
{ |
|
|
|
throw new ArgumentException(Resources.ConvergenceFailed); |
|
|
|
throw new NonConvergenceException(); |
|
|
|
} |
|
|
|
|
|
|
|
// Look for two consecutive small sub-diagonal elements
|
|
|
|
|