Math::Matrix struct reference
[Core module]
Declaration
#include <Goptical/Math/Matrix>
namespace Goptical {
namespace Math {
template <int N> struct Matrix;
};
};
This struct is a member of the Math namespace.
Description
Members
See also the full member list section for this struct.
Functions
- void adjugate(Matrix &result) const
- Matrix adjugate() const
- double determinant() const
- void inverse(Matrix &result) const
- Matrix inverse() const
- Matrix operator*(double scale) const
- Matrix operator*(const Matrix &m) const
- Vector<N> operator*(const Vector<N> &v) const
- Matrix operator+(const Matrix &m) const
- Matrix operator-(const Matrix &m) const
- Matrix operator/(double scale) const
- Matrix & set(double value = [...])
- Matrix & set_col(int col, double value)
- Matrix & set_col(int col, const Vector<N> &v)
- Matrix & set_diag(double value = [...])
- Matrix & set_diag(const Vector<N> &v)
- Matrix & set_id()
- Matrix & set_row(int row, double value)
- Matrix & set_row(int row, const Vector<N> &v)
- void transpose(Matrix &result) const
- Matrix transpose() const
- double value(int x, int y) const
- double & value(int x, int y)
Members detail
void adjugate(Matrix &result) const
replace matrix by the adjugate matrix
Matrix adjugate() const
Get the adjugate matrix
compute matrix determinant
void inverse(Matrix &result) const
replace matrix by the inverse matrix
Matrix inverse() const
Get the inverse matrix
Matrix operator*(double scale) const
Scale matrix
Multiply matrix
Multiply matrix with vector. See Vector class for vector/matrix multiplication.
Add matrix
Subtract matrix
Matrix operator/(double scale) const
Scale matrix
Matrix & set(double value = 0)
Set whole matrix to specified value.
Matrix & set_col(int col, double value)
Set whole matrix column to specified value.
Set matrix column to specified vector.
Matrix & set_diag(double value = 1)
Set matrix diagonal to specified value.
Set matrix diagonal to specified value.
Matrix & set_id()
Setup an identity matrix.
Matrix & set_row(int row, double value)
Set whole matrix row to specified value.
Set matrix row to specified vector.
void transpose(Matrix &result) const
replace matrix by the transposed matrix
Matrix transpose() const
Get the transposed matrix
Get value at x row and y column
Get modifiable reference to value at x row and y column