forked from tsai/mathnet-numerics
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
58 lines
1.6 KiB
using System;
|
|
using MathNet.Numerics.Properties;
|
|
|
|
namespace MathNet.Numerics
|
|
{
|
|
/// <summary>
|
|
/// An algorithm failed to converge.
|
|
/// </summary>
|
|
[Serializable]
|
|
public class NonConvergenceException : Exception
|
|
{
|
|
public NonConvergenceException() : base(Resources.ConvergenceFailed)
|
|
{
|
|
}
|
|
|
|
public NonConvergenceException(string message) : base(message)
|
|
{
|
|
}
|
|
|
|
public NonConvergenceException(string message, Exception innerException) : base(message, innerException)
|
|
{
|
|
}
|
|
#if !PORTABLE
|
|
protected NonConvergenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
|
|
: base(info, context)
|
|
{
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// An algorithm failed to converge due to a numerical breakdown.
|
|
/// </summary>
|
|
[Serializable]
|
|
public class NumericalBreakdownException : NonConvergenceException
|
|
{
|
|
public NumericalBreakdownException()
|
|
: base(Resources.NumericalBreakdown)
|
|
{
|
|
}
|
|
|
|
public NumericalBreakdownException(string message)
|
|
: base(message)
|
|
{
|
|
}
|
|
|
|
public NumericalBreakdownException(string message, Exception innerException)
|
|
: base(message, innerException)
|
|
{
|
|
}
|
|
#if !PORTABLE
|
|
protected NumericalBreakdownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
|
|
: base(info, context)
|
|
{
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
|