Extreme Optimization > User's Guide > Mathematics Library > Appendices > Exception Types

Extreme Optimization User's Guide

User's Guide

Up: Appendices Next: Enumeration Types Previous: Appendices Contents

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  IterativeAlgorithm 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 IterativeAlgorithm 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 GeneralMatrix objects involved in an operation are not compatible. Some examples of requirements that may be violated, resulting in a DimensionMismatchException, are:

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 Matrix 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 Matrix is singular.

Up: Appendices Next: Enumeration Types Previous: Appendices Contents

Overview
Introduction
Features
Documentation
QuickStart Samples
Sample Applications
Downloads
Get it now!
Download trial version
How to Buy
Information
Resources
Contact Us
Search

"The Extreme Optimization Statistics Library for .NET is a major boon for those doing statistical work in .NET. I strongly recommend this product."
- Marc Brooks

"I have made it my mission to institutionalize the value of good API design.  I strongly believe that this is key to making developers more productive and happy on our platform. It is clear that you value good API design in your work, and take to heart developer productivity and synergy with the .NET framework."
- Brad Abrams,
Lead Program Manager, Microsoft.

This is a partial list of companies who are using our libraries:
ABB Robotics
Allstate
Applied Materials
Arcam
Astra Schedule
Babson College
Canadian Council on Learning
Canyon Associates
Caxton Associates
CECity
Constellation Energy
CreditSights
DeepOcean
Duke University
Dynamotive
Elecsoft
Engelhard Corporation
Epcor
Equipoise Software
Galileo International
GAM UK
Gammex
GlaxoSmithKline
Global Matrix
The Hartford
Infinera Corporation
Intel
JDS Uniphase
LaBranche & Co.
Learning & Skills Council
Jacobs Consultancy
Litman Gregory
Lucas Systems
Malvern Instruments
Medrio
Merck & Co.
Mintera.
Monitor Software
MorningStar
NanoString Technologies
Paletta Invent
Parametric Portfolio Associates
Prosanos
RATA Associates
RiskShield
Ramboll
Standard & Poor's
Strategic Analysis Corporation
Univ. of Alicante
Univ. of South Carolina
vielife
Xerox
US Army