42#ifndef Foam_DiagonalMatrix_H
43#define Foam_DiagonalMatrix_H
53template<
class Form,
class Type>
class Matrix;
101 template<
class CompOp>
DiagonalMatrix(const Matrix< Form, Type > &mat)
Construct from the diagonal of a Matrix.
labelList sortPermutation(const CompOp &compare) const
Return a sort permutation labelList according to a given comparison on the diagonal entries.
DiagonalMatrix(const DiagonalMatrix &)=default
Copy construct.
DiagonalMatrix()=default
Default construct.
DiagonalMatrix(const label n, Foam::zero)
Construct from size and initialise all elems to zero.
void invert()
Return the matrix inverse into itself.
DiagonalMatrix(const label n)
Construct from size, uninitialised content.
DiagonalMatrix & operator=(const DiagonalMatrix &)=default
Copy assignment.
void applyPermutation(const labelUList &p)
Column-reorder this Matrix according to a given permutation labelList.
DiagonalMatrix(const label n, const Type &val)
Construct from size and initialise all elems to value.
A templated (m x n) matrix of objects of <T>. The layout is (mRows x nCols) - row-major order:
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
List< label > labelList
A List of labels.
UList< label > labelUList
A UList of labels.