RectangularMatrix: Removed the identity function (now in SquareMatrix)
This commit is contained in:
parent
e3f3c03ca8
commit
04dcee7680
@ -40,7 +40,6 @@ SourceFiles
|
||||
|
||||
#include "Matrix.H"
|
||||
#include "SquareMatrix.H"
|
||||
#include "Identity.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -79,10 +78,6 @@ public:
|
||||
// initializing all elements to zero
|
||||
inline RectangularMatrix(const label m, const label n, const zero);
|
||||
|
||||
//- Construct given number of rows/columns
|
||||
// Initializing to the identity matrix
|
||||
inline RectangularMatrix(const label n, const Identity<Type>);
|
||||
|
||||
//- Construct with given number of rows and columns
|
||||
// and value for all elements.
|
||||
inline RectangularMatrix(const label m, const label n, const Type&);
|
||||
|
@ -77,22 +77,6 @@ inline Foam::RectangularMatrix<Type>::RectangularMatrix
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::RectangularMatrix<Type>::RectangularMatrix
|
||||
(
|
||||
const label n,
|
||||
const Identity<Type>
|
||||
)
|
||||
:
|
||||
Matrix<RectangularMatrix<Type>, Type>(n, n, Zero)
|
||||
{
|
||||
for (label i=0; i<n; i++)
|
||||
{
|
||||
this->operator()(i, i) = I;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::RectangularMatrix<Type>::RectangularMatrix
|
||||
(
|
||||
|
@ -103,7 +103,7 @@ inline Foam::SquareMatrix<Type>::SquareMatrix
|
||||
{
|
||||
for (label i=0; i<n; i++)
|
||||
{
|
||||
this->operator()(i, i) = I;
|
||||
this->operator()(i, i) = Type(I);
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ void Foam::SquareMatrix<Type>::operator=(const Identity<Type>)
|
||||
Matrix<SquareMatrix<Type>, Type>::operator=(Zero);
|
||||
for (label i=0; i<this->n(); i++)
|
||||
{
|
||||
this->operator()(i, i) = I;
|
||||
this->operator()(i, i) = Type(I);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user