Matrix class implementation file.
More...
#include "Matrix.h"
#include <algorithm>
#include <assert.h>
Matrix class implementation file.
◆ operator*() [1/3]
This creates the product of two Matrices. The first Matrix must have the same number of columns as the second Matrix has rows.
Note that multiplication is declared as a friend. It could be declared as a normal method Matrix operator*(const Matrix& rhs);
. The friend form provides a more symmetric view of the two Matrices being multiplied. It could also be defined in terms of a *=
operator, but it is not clear whether A *= B; means A = A*B or A = B*A. So this is omitted to avoid confusion.
- Parameters
-
lhs | The Matrix on the left hand side of the *. |
rhs | The Matrix on the right hand side of the *. |
- Returns
- The Matrix formed by lhs * rhs.
◆ operator*() [2/3]
◆ operator*() [3/3]
◆ operator+()
◆ operator-()
◆ operator/()
◆ operator<<()
std::ostream& operator<< |
( |
std::ostream & |
outputStream, |
|
|
const Matrix & |
mat |
|
) |
| |
|
related |
◆ operator>>()
std::istream& operator>> |
( |
std::istream & |
inputStream, |
|
|
Matrix & |
mat |
|
) |
| |
|
related |