1 -- Created on: 1991-05-13
2 -- Created by: Laurent PAINNOT
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
24 ---Purpose: SVD implements the solution of a set of N linear equations
25 -- of M unknowns without condition on N or M. The Singular
26 -- Value Decomposition algorithm is used. For singular or
27 -- nearly singular matrices SVD is a better choice than Gauss
28 -- or GaussLeastSquare.
30 uses Matrix from math,
34 raises NotDone from StdFail,
35 DimensionError from Standard
41 -- Given as input an n X m matrix A with n < m, n = m or n > m
42 -- this constructor performs the Singular Value Decomposition.
48 ---Purpose: Returns true if the computations are successful, otherwise returns false.
54 Solve(me; B: Vector; X: out Vector; Eps: Real = 1.0e-6)
56 -- Given the input Vector B this routine solves the set of linear
57 -- equations A . X = B.
58 -- Exception NotDone is raised if the decomposition of A was not done
60 -- Exception DimensionError is raised if the range of B is not
61 -- equal to the rowrange of A.
62 -- Exception DimensionError is raised if the range of X is not
63 -- equal to the colrange of A.
70 PseudoInverse(me; Inv : out Matrix; Eps: Real= 1.0e-6)
71 ---Purpose: Computes the inverse Inv of matrix A such as A * Inverse = Identity.
73 -- StdFail_NotDone if the algorithm fails (and IsDone returns false).
74 -- Standard_DimensionError if the ranges of Inv are
75 -- compatible with the ranges of A.
81 Dump(me; o: in out OStream)
82 ---Purpose: Prints information on the current state of the object.
83 -- Is used to redefine the operator <<.