Extreme Optimization™: Complexity made simple.

Numerical Components
for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Blog
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Contact us
Introduction
Deployment Guide
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand ReferenceReference
  • Home
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Mathematics Library User's Guide
    • General Classes
    • Mathematical Functions
    • Complex Numbers
    • Arbitrary Precision Arithmetic
    • Automatic Differentiation
    • Curves
    • Curve Fitting
    • Solving Equations
    • Optimization
    • Calculus
    • Fast Fourier Transforms
    • Generic Arithmetic
    • Appendices
  • Appendices
    • Enumeration Types
    • Exception Types
  • Exception Types
Collapse image Expand Image Copy image CopyHover image
         




Exception Types

This section lists the exception types that may be thrown by classes in the Extreme Optimization Mathematics Library for .NET.

In addition to the exceptions listed below, many standard exceptions may also be thrown. For instance, when the index for a vector or matrix is out of range, an ArgumentOutOfRangeException is thrown. When a user tries to obtain the result from a descendant of ManagedIterativeAlgorithm<(Of <(<'T>)>)> before the algorithm has terminated, an InvalidOperationException is thrown. This behavior is consistent with Microsoft's guidelines for throwing exceptions.

ConvergenceException

This exception indicates that an algorithm failed to converge. This exception is only thrown if the ThrowExceptionOnFailure property is set to true. See the ManagedIterativeAlgorithm<(Of <(<'T>)>)> interface for details.

TotalLossOfPrecisionException

In some rare cases, round-off error can cause the result of an operation to have no correct significant digits at all. When this happens, an exception of type TotalLossOfPrecisionException is thrown.

Round-off errors are the result of the finite precision of floating-point numbers. Only a few numbers can be represented exactly. The main contributing factor to total loss of precision is when two numbers of approximately equal size are subtracted.

ComponentReadOnlyException

Many matrices have a clearly defined structure. For example, all elements above the diagonal of a lower triangular matrix are zero. If the matrix is also unit diagonal, then its diagonal elements have the fixed value of 1.

Changing the value of one of these elements would cause the vector or matrix to lose its structure. This is not allowed. In this case, a ComponentReadOnlyException is thrown.

DimensionMismatchException

There are many reasons why a DimensionMismatchException may be thrown. In every case, the dimensions of some or all of the Vector or DenseMatrix objects involved in an operation are not compatible. Some examples of requirements that may be violated, resulting in a DimensionMismatchException, are:

  • A method requires a Matrix to be square. The matrix that was supplied is rectangular.
  • An operation on two Vector objects requires that the two vectors have the same length. Most operations on vectors have this requirement.
  • A multiplication of a Matrix and a Vector requires that either the number of rows or the number of columns in the matrix equals the length of the vector.
  • A multiplication of two matrices requires that the 'inner' dimensions are the same.

This exception type has four properties that give more information about the cause of the problem:

Property

Description

FirstDimensionType

The DimensionType of the first parameter involved in the operation.

FirstParameterName

The name of the first parameter involved in the operation.

SecondDimensionType

The DimensionType of the second parameter involved in the operation. If there was only one parameter involved, this property equals DimensionType.Unknown.

SecondParameterName

The name of the second parameter involved in the operation. If there was only one parameter involved, the value of this property is an empty string.

The DimensionType enumeration can have the following values:

Member Name

Description

Unknown

The mismatched dimension is unknown.

Row

The number of rows of a Matrix is mismatched.

Column

The number of columns of a Matrix is mismatched.

Length

The length of a Vector is mismatched.

MatrixNotPositiveDefiniteException

A matrix is positive definite when all its eigenvalues are greater than or equal to zero. A MatrixNotPositiveDefiniteException is thrown when a computation cannot be completed because a DenseMatrix is not positive definite. In particular, for the Cholesky Decomposition of a symmetrical matrix to exist, the matrix must be positive definite.

MatrixSingularException

A MatrixSingularException is thrown when a computation cannot be completed because a DenseMatrix is singular.

Send comments on this topic to support@extremeoptimization.com

Copyright (c) 2004-2011 ExoAnalytics Inc.

Copyright © 2003-2013, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.