1 // Copyright (c) 1997-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
17 #include <Standard_DimensionError.hxx>
18 #include <math_Vector.hxx>
20 inline Standard_OStream& operator<<(Standard_OStream& o,
21 const math_Matrix& mat)
27 inline math_Matrix operator* (const Standard_Real Left,
28 const math_Matrix& Right)
30 return Right.Multiplied(Left);
35 inline Standard_Real& math_Matrix::Value(const Standard_Integer Row,
36 const Standard_Integer Col)const
38 Standard_RangeError_Raise_if(((Row < LowerRowIndex) ||
39 (Row > UpperRowIndex) ||
40 (Col < LowerColIndex) ||
41 (Col > UpperColIndex)), " ");
43 return Array(Row, Col);
46 inline Standard_Integer math_Matrix::RowNumber() const
47 { return UpperRowIndex - LowerRowIndex + 1; }
49 // returns the row range of a matrix.
51 inline Standard_Integer math_Matrix::ColNumber() const
52 { return UpperColIndex - LowerColIndex + 1; }
54 // returns the column range of a matrix.
59 inline Standard_Integer math_Matrix::LowerRow() const { return LowerRowIndex; }
61 // returns the value of the Lower index of the row range of a matrix.
63 inline Standard_Integer math_Matrix::UpperRow () const { return UpperRowIndex; }
65 // returns the value of the Upper index of the row range of a matrix.
67 inline Standard_Integer math_Matrix::LowerCol() const { return LowerColIndex; }
69 // returns the value of the Lower index of the column range of a matrix.
71 inline Standard_Integer math_Matrix::UpperCol() const { return UpperColIndex; }
73 // returns the value of the Upper index of the column range of a matrix.
75 inline void math_Matrix::SetLower (const Standard_Integer LowerRow,
76 const Standard_Integer LowerCol)
78 SetLowerRow(LowerRow);
79 SetLowerCol(LowerCol);