Removed unused class field Singular.
math_FunctionWithDerivative.hxx
math_Gauss.cxx
math_Gauss.hxx
-math_Gauss.lxx
math_GaussLeastSquare.cxx
math_GaussLeastSquare.hxx
math_GaussLeastSquare.lxx
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-//#ifndef OCCT_DEBUG
-#define No_Standard_RangeError
-#define No_Standard_OutOfRange
-#define No_Standard_DimensionError
-
-//#endif
-
#include <math_Gauss.hxx>
+
#include <math_Matrix.hxx>
#include <math_NotSquare.hxx>
#include <math_Recipes.hxx>
math_Gauss::math_Gauss(const math_Matrix& A,
const Standard_Real MinPivot,
const Handle(Message_ProgressIndicator) & aProgress)
- : LU (1, A.RowNumber(), 1, A.ColNumber()),
- Index(1, A.RowNumber()) {
-
+: LU (1, A.RowNumber(), 1, A.ColNumber()),
+ Index(1, A.RowNumber()),
+ D (0.0),
+ Done (Standard_False)
+{
math_NotSquare_Raise_if(A.RowNumber() != A.ColNumber(), " ");
LU = A;
Standard_Integer Error = LU_Decompose(LU,
o << " Status = not Done \n";
}
}
-
-
-
-
class math_Matrix;
class Message_ProgressIndicator;
-
-
//! This class implements the Gauss LU decomposition (Crout algorithm)
//! with partial pivoting (rows interchange) of a square matrix and
//! the different possible derived calculation :
DEFINE_STANDARD_ALLOC
-
-
//! Given an input n X n matrix A this constructor performs its LU
//! decomposition with partial pivoting (interchange of rows).
//! This LU decomposition is stored internally and may be used to
const Handle(Message_ProgressIndicator) & aProgress = Handle(Message_ProgressIndicator)());
//! Returns true if the computations are successful, otherwise returns false
- Standard_Boolean IsDone() const;
-
+ Standard_Boolean IsDone() const { return Done; }
//! Given the input Vector B this routine returns the solution X of the set
//! of linear equations A . X = B.
//! Exception DimensionError is raised if the range of B is not
//! equal to the number of rows of A.
Standard_EXPORT void Solve (const math_Vector& B, math_Vector& X) const;
-
//! Given the input Vector B this routine solves the set of linear
//! equations A . X = B. B is replaced by the vector solution X.
//! Exception DimensionError is raised if the range of B is not
//! equal to the number of rows of A.
Standard_EXPORT void Solve (math_Vector& B) const;
-
//! This routine returns the value of the determinant of the previously LU
//! decomposed matrix A.
//! Exception NotDone may be raised if the decomposition of A was not done
//! successfully, zero is returned if the matrix A was considered as singular.
Standard_EXPORT Standard_Real Determinant() const;
-
//! This routine outputs Inv the inverse of the previously LU decomposed
//! matrix A.
//! Is used to redefine the operator <<.
Standard_EXPORT void Dump (Standard_OStream& o) const;
-
-
-
protected:
-
-
- Standard_Boolean Singular;
math_Matrix LU;
math_IntegerVector Index;
Standard_Real D;
-
-
-private:
-
-
-
Standard_Boolean Done;
-
};
-
-#include <math_Gauss.lxx>
-
-
-
-
+inline Standard_OStream& operator<<(Standard_OStream& o, const math_Gauss& mG)
+{
+ mG.Dump(o);
+ return o;
+}
#endif // _math_Gauss_HeaderFile
+++ /dev/null
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-// math_Gauss.lxx
-// lpa, le 28/01/92
-
-inline Standard_Boolean math_Gauss::IsDone() const { return Done; }
-
-inline Standard_OStream& operator<<(Standard_OStream& o, const math_Gauss& mG)
-{
- mG.Dump(o);
- return o;
-}
-