| 53 | |
| 54 | template<class Type> |
| 55 | class DiagonalMatrix |
| 56 | : |
| 57 | public List<Type> |
| 58 | { |
| 59 | public: |
| 60 | |
| 61 | // Constructors |
| 62 | |
| 63 | //- Null constructor. |
| 64 | DiagonalMatrix<Type>(); |
| 65 | |
| 66 | //- Construct from diagonal component of a Matrix |
| 67 | template<class Form> |
| 68 | DiagonalMatrix<Type>(const Matrix<Form, Type>&); |
| 69 | |
| 70 | //- Construct empty from size |
| 71 | DiagonalMatrix<Type>(const label size); |
| 72 | |
| 73 | //- Construct from size and a value |
| 74 | DiagonalMatrix<Type>(const label, const Type&); |
| 75 | |
| 76 | |
| 77 | // Member functions |
| 78 | |
| 79 | //- Invert the diagonal matrix and return itself |
| 80 | DiagonalMatrix<Type>& invert(); |
| 81 | }; |
| 82 | |
| 83 | |
| 84 | // Global functions |