Three dimensional matrix. More...
#include <Matrix3.hh>
Public Member Functions | |
constexpr Matrix | Symmetry () |
Constructor | |
constexpr | Matrix3 () |
Default constructor. More... | |
Matrix3 (Value_ scalar, Matrix matrix=Matrix::diagonal) | |
Constructor accepting a scalar. More... | |
Matrix3 (Vector3< Value_ > const &x, Vector3< Value_ > const &y, Vector3< Value_ > const &z, Matrix matrix=Matrix::row) | |
Constructor accepting three vectors. More... | |
Matrix3 (Vector3< Value_ > const &vector_1, Vector3< Value_ > const &vector_2, Matrix matrix=Matrix::symmetric) | |
Constructor accepting two vectors. More... | |
Matrix3 (Vector3< Value_ > const &vector, Matrix matrix=Matrix::antisymmetric) | |
Constructor accepting one vector. More... | |
Matrix3 (Vector3< Value_ > const &vector, Dim3 dim, Matrix matrix=Matrix::row) | |
Constructor accepting one vector and its direction. More... | |
Matrix3 (TQuaternion const &quaternion) | |
Constructor accepting a root::TQuaternion. More... | |
template<typename Value_2 > | |
constexpr | Matrix3 (Matrix3< Value_2 > const &matrix) |
Copy construct with casting. More... | |
Setter | |
Matrix3 & | SetDiagonal (Value_ value) |
Set the diagonal to uniform value. More... | |
Matrix3 & | SetDiagonal (Vector3< Value_ > vector) |
Set the diagonal to given vector. More... | |
Matrix3 & | SetUpperTriangle (Vector3< Value_ > vector) |
vector of upper triangle More... | |
Matrix3 & | SetLowerTriangle (Vector3< Value_ > vector) |
vector of lower triangle More... | |
Matrix3 & | SetToIdentity () |
Set to the diagonal to identiy. More... | |
Matrix3 & | SetUniform (Value_ value) |
Set the matrix to uniform value. More... | |
void | SetRows (Vector3< Value_ > const &x, Vector3< Value_ > const &y, Vector3< Value_ > const &z) |
Set the rows according to given vectors. More... | |
void | SetRow (Vector3< Value_ > const &vector, Dim3 dim) |
Set a row according to vector and direction. More... | |
void | SetColumns (Vector3< Value_ > const &x, Vector3< Value_ > const &y, Vector3< Value_ > const &z) |
Set columns according to given vectors. More... | |
void | SetColumn (Vector3< Value_ > const &vector, Dim3 dim) |
Set a column according to vector and its direction. More... | |
void | SetAntisymmetric (Vector3< Value_ > const &vector) |
Fill the matrix antisymmetrically with the values of the vector. More... | |
Matrix3 & | SetEulerAngles (Angle const &phi, Angle const &theta, Angle const &psi, Dim2 dim=Dim2::x) |
Set the Euler angles. More... | |
void | SetPhi (Angle const &phi, Dim2 dim=Dim2::x) |
Set phi. More... | |
void | SetTheta (Angle const &theta, Dim2 dim=Dim2::x) |
Set theta. More... | |
void | SetPsi (Angle const &psi, Dim2 dim=Dim2::x) |
Set psi. More... | |
Matrix3 & | SetAxis (Vector3< Value_ > const &axis, Dim3 dim) |
Set axis. More... | |
Matrix3 & | SetAxis (Vector3< Value_ > const &axis, Vector3< Value_ > const &plane, Dim3 dim) |
Set axis. More... | |
Accessor and getter | |
constexpr Vector3< Value_ > const & | X () const |
x-row More... | |
Vector3< Value_ > & | X () |
x-row More... | |
constexpr Vector3< Value_ > const & | Y () const |
y-row More... | |
Vector3< Value_ > & | Y () |
y-row More... | |
Vector3< Value_ > & | Z () |
z-row More... | |
constexpr Vector3< Value_ > const & | Z () const |
z-row More... | |
Vectors | |
constexpr Vector3< Value_ > | ColumnX () const |
x-column More... | |
constexpr Vector3< Value_ > | ColumnY () const |
y-column More... | |
constexpr Vector3< Value_ > | ColumnZ () const |
z-column More... | |
constexpr Vector3< Value_ > | Diagonal () |
vector of the diagonal More... | |
constexpr Vector3< Value_ > | UpperTriangle () |
vector of upper triangle More... | |
constexpr Vector3< Value_ > | LowerTriangle () |
vector of lower triangle More... | |
Scalar | |
constexpr auto | Sign (Dim3 i, Dim3 j) const |
Sign of a given element \((-1)^{i+j}\). More... | |
constexpr auto | Trace () const |
Trace \(\text{tr} A = A_{x, x} + A_{y, y} + A_{z, z}\). More... | |
template<typename Value_2_ > | |
constexpr auto | ProductTrace (Matrix3< Value_2_ > const &matrix) const |
Trace of the product of two matrices \(\text{tr}(A B)\). More... | |
constexpr auto | Determinant () const |
Determinant \(\det A = \sum_{i=1}^n A_{i, j} C_{i, j}\). More... | |
constexpr auto | Laplace (Dim3 dim_1, Dim3 dim_2) const |
Laplace \(A_{i, j} C_{i, j}\). More... | |
constexpr auto | Cofactor (Dim3 dim_1, Dim3 dim_2) const |
Cofactor \(C_{i, j} = (-1)^{i+j} M_{i, j}\). More... | |
constexpr auto | Minor (Dim3 delete_1, Dim3 delete_2) const |
Minor \(M_{i, j} = \det ((A_{p, q})_{p\neq i, q\neq j})\). More... | |
constexpr auto | ReducedDeterminant (Dim3 dim_1, Dim3 dim_2) const |
Reduced determinant \(\det_{i, j} A = \det A - A_{i, j} C_{i, j}\). More... | |
Angles | |
Angle | Phi (Dim3 dim) const |
Phi. More... | |
Angle | Theta (Dim3 dim) const |
Theta. More... | |
Angle | Phi (Dim2 dim) const |
Phi. More... | |
Angle | Theta (Dim2=Dim2::x) const |
Theta. More... | |
Angle | Psi (Dim2 dim) const |
Psi. More... | |
Matrix | |
constexpr Matrix3 | Transposed () const |
transposed matrix More... | |
constexpr Matrix3 & | Transpose () |
transpose this matrix More... | |
constexpr Matrix3< ValueInverse > | Inverse () |
Inverse matrix. More... | |
auto | SubMatrix (Dim3 delete_1, Dim3 delete_2) const |
Sub matrix \((A_{p, q})_{p\neq i, q\neq j}\). More... | |
constexpr Matrix3 & | MoveTo (Dim3 dim_1, Dim3 dim_2) |
Move row cyclic from dim1 to dim 2. More... | |
Rotate | |
Matrix3 & | Rotate (Angle const &phi, Dim3 dim_1, Dim3 dim_2) |
Rotate by phi in (dim_1, dim_2) plain. More... | |
constexpr Matrix3 & | Rotate (Angle const &phi, Dim3 dim) |
Rotate by phi around axis dim. More... | |
Matrix3 & | Rotate (Angle const &phi, Vector3< Value_ > const &axis) |
Rotation by phi around axis. More... | |
constexpr Matrix3 & | RotateAxes (Vector3< Value_ > const &vector_x, Vector3< Value_ > const &vector_y, Vector3< Value_ > const &vector_z) |
Rotation of local axes. More... | |
constexpr Matrix3 & | RotateEulerAngles (Angle const &phi, Angle const &theta, Angle const &psi, Dim2 dim=Dim2::x) |
Set the euler angles of the rotation. More... | |
std::pair< Vector3< Value_ >, Angle > | AngleAxis () const |
rotation defined by an angle and a vector More... | |
Products | |
template<typename Value_2_ > | |
constexpr Matrix3< ValueProduct< Value_2_ > > | Multiply (Matrix3< Value_2_ > const &matrix) const |
Multiplication with a matrix. More... | |
template<typename Value_2_ > | |
constexpr Vector3< ValueProduct< Value_2_ > > | Multiply (Vector3< Value_2_ > const &vector) const |
Multiplication with a Vector. More... | |
template<typename Value_2_ > | |
constexpr Matrix3< ValueProduct< Value_2_ > > | Scale (Value_2_ scalar) const |
Scale by scalar. More... | |
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>> | |
constexpr Matrix3< ValueProduct< Value_2_ > > & | Transform (Matrix3< Value_2_ > const &matrix) |
Transform this matrix by another. More... | |
template<typename Value_2_ > | |
constexpr Matrix3< ValueProduct< Value_2_ > > & | Transformed (Matrix3< Value_2_ > const &matrix) |
Transform this matrix by another. More... | |
Eigen system | |
constexpr Array3< Value_ > | EigenValues () const |
Eigen values. More... | |
constexpr Array3< Vector3< Value_ > > | EigenVectors () const |
Eigen vectors. More... | |
constexpr Array3< GradedVector3< Value_ > > | EigenSystem () const |
Eigen system. More... | |
Operator | |
constexpr bool | operator< (Matrix3 const &matrix) const |
Less than comparison according to the absolute value of the determinant. More... | |
constexpr bool | operator== (Matrix3 const &matrix) const |
Equality comnparison. More... | |
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>> | |
Matrix3 & | operator+= (Matrix3< Value_2_ > const &matrix) |
Addition. More... | |
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>> | |
Matrix3 & | operator-= (Matrix3< Value_2_ > const &matrix) |
Substraction. More... | |
template<typename Value_2_ , typename = OnlyIfNotQuantity<Value_2_>> | |
constexpr Matrix3 & | operator*= (Matrix3< Value_2_ > const &matrix) |
Multiplication with a matrix. More... | |
template<typename Value_2_ > | |
constexpr Matrix3< ValueProduct< Value_2_ > > | operator* (Matrix3< Value_2_ > const &matrix) const |
Multiplication with a matrix. More... | |
template<typename Value_2_ > | |
constexpr Vector3< ValueProduct< Value_2_ > > | operator* (Vector3< Value_2_ > const &vector) const |
Multiplication with a Vector. More... | |
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>> | |
Matrix3< ValueQuotient< Value_2_ > > | operator/= (Value_2_ scalar) |
Division by scalar. More... | |
template<typename Value_2_ > | |
constexpr Matrix3< ValueQuotient< Value_2_ > > | operator/ (Value_2_ scalar) const |
Division by scalar. More... | |
constexpr Vector3< Value_ > const & | operator() (Dim3 dim) const |
Components by index. More... | |
Vector3< Value_ > & | operator() (Dim3 dim) |
Components by index. More... | |
constexpr Value_ | operator() (Dim3 i, Dim3 j) const |
Components by index. More... | |
Value_ & | operator() (Dim3 i, Dim3 j) |
Components by index. More... | |
constexpr Vector3< Value_ > const & | operator[] (Dim3 dim_3) const |
Components by index. More... | |
Vector3< Value_ > & | operator[] (Dim3 dim_3) |
Components by index. More... | |
auto & | operator<< (std::ostream &stream, Matrix3< Value_ > const &matrix) |
Output stream operator. More... | |
Iterator | |
using | Dimension = Dim3 |
Const begin. More... | |
constexpr ConstSubIterator< boca::Matrix3, Vector3, Value_ > | begin () const |
Const begin. More... | |
constexpr ConstSubIterator< boca::Matrix3, Vector3, Value_ > | end () const |
Const end. More... | |
SubIterator< boca::Matrix3, Vector3, Value_ > | begin () |
Begin. More... | |
SubIterator< boca::Matrix3, Vector3, Value_ > | end () |
End. More... | |
Detailed Description
template<typename Value_>
class boca::Matrix3< Value_ >
Three dimensional matrix.
Member Typedef Documentation
using boca::Matrix3< Value_ >::Dimension = Dim3 |
Const begin.
Constructor & Destructor Documentation
|
inline |
Default constructor.
|
inline |
Constructor accepting a scalar.
|
inline |
Constructor accepting three vectors.
|
inline |
Constructor accepting two vectors.
|
inline |
Constructor accepting one vector.
|
inline |
Constructor accepting one vector and its direction.
|
inline |
Constructor accepting a root::TQuaternion.
Constructor for a rotation based on a Quaternion if magnitude of quaternion is null, creates identity rotation if quaternion is non-unit, creates rotation corresponding to the normalized(unit) quaternion.
|
inline |
Copy construct with casting.
Member Function Documentation
|
inline |
rotation defined by an angle and a vector
|
inline |
Const begin.
|
inline |
Begin.
|
inline |
Cofactor \(C_{i, j} = (-1)^{i+j} M_{i, j}\).
|
inline |
x-column
|
inline |
y-column
|
inline |
z-column
|
inline |
Determinant \(\det A = \sum_{i=1}^n A_{i, j} C_{i, j}\).
|
inline |
vector of the diagonal
|
inline |
Eigen system.
|
inline |
Eigen values.
|
inline |
Eigen vectors.
|
inline |
Const end.
|
inline |
End.
|
inline |
Inverse matrix.
return zero matrix if the determinant is zero
|
inline |
Laplace \(A_{i, j} C_{i, j}\).
|
inline |
vector of lower triangle
|
inline |
Minor \(M_{i, j} = \det ((A_{p, q})_{p\neq i, q\neq j})\).
|
inline |
Move row cyclic from dim1 to dim 2.
|
inline |
Multiplication with a matrix.
|
inline |
Multiplication with a Vector.
|
inline |
Components by index.
|
inline |
Components by index.
|
inline |
Components by index.
|
inline |
Components by index.
|
inline |
Multiplication with a matrix.
|
inline |
Multiplication with a Vector.
|
inline |
Multiplication with a matrix.
|
inline |
Addition.
|
inline |
Substraction.
|
inline |
Division by scalar.
|
inline |
Division by scalar.
|
inline |
Less than comparison according to the absolute value of the determinant.
|
inline |
Equality comnparison.
|
inline |
Components by index.
|
inline |
Components by index.
|
inline |
Phi.
|
inline |
Phi.
|
inline |
Trace of the product of two matrices \(\text{tr}(A B)\).
|
inline |
Psi.
|
inline |
Reduced determinant \(\det_{i, j} A = \det A - A_{i, j} C_{i, j}\).
|
inline |
Rotate by phi in (dim_1, dim_2) plain.
|
inline |
Rotate by phi around axis dim.
|
inline |
Rotation by phi around axis.
|
inline |
Rotation of local axes.
|
inline |
Set the euler angles of the rotation.
|
inline |
Scale by scalar.
|
inline |
Fill the matrix antisymmetrically with the values of the vector.
|
inline |
Set axis.
|
inline |
Set axis.
|
inline |
Set a column according to vector and its direction.
|
inline |
Set columns according to given vectors.
|
inline |
Set the diagonal to uniform value.
|
inline |
Set the diagonal to given vector.
|
inline |
Set the Euler angles.
Dim2 defines the type of Euler rotation
|
inline |
vector of lower triangle
|
inline |
Set phi.
|
inline |
Set psi.
|
inline |
Set a row according to vector and direction.
|
inline |
Set the rows according to given vectors.
|
inline |
Set theta.
|
inline |
Set to the diagonal to identiy.
|
inline |
Set the matrix to uniform value.
|
inline |
vector of upper triangle
|
inline |
Sign of a given element \((-1)^{i+j}\).
|
inline |
Sub matrix \((A_{p, q})_{p\neq i, q\neq j}\).
|
inline |
|
inline |
Theta.
|
inline |
Theta.
|
inline |
Trace \(\text{tr} A = A_{x, x} + A_{y, y} + A_{z, z}\).
|
inline |
Transform this matrix by another.
|
inline |
Transform this matrix by another.
|
inline |
transpose this matrix
|
inline |
transposed matrix
|
inline |
vector of upper triangle
|
inline |
x-row
|
inline |
x-row
|
inline |
y-row
|
inline |
y-row
|
inline |
z-row
|
inline |
z-row
Friends And Related Function Documentation
|
friend |
Output stream operator.
The documentation for this class was generated from the following file:
- boca/math/Matrix3.hh