atomicrex
0.1
An advanced atomistic model building tool
|
A 3x3 matrix. More...
#include <Matrix3.h>
Classes | |
struct | Identity |
An empty type that denotes the 3x3 identity matrix. More... | |
struct | Zero |
An empty type that denotes a 3x3 matrix with all elements equal to zero. More... | |
Public Types | |
typedef T | element_type |
The type of a single element of the matrix. | |
typedef Vector_3< T > | column_type |
The type of a single column of the matrix. | |
Public Member Functions | |
Matrix_3 () | |
Empty default constructor that does not initialize the matrix elements (for performance reasons). The matrix elements will have an undefined value and need to be initialized later. | |
constexpr | Matrix_3 (T m11, T m12, T m13, T m21, T m22, T m23, T m31, T m32, T m33) |
Constructor that initializes all 9 elements of the matrix to the given values. More... | |
Related Functions | |
(Note that these are not member functions.) | |
using | Matrix3 = Matrix_3< FloatType > |
Instantiation of the Matrix_3 class template with the default floating-point type. | |
template<typename T > | |
constexpr Vector_3< T > | operator* (const Matrix_3< T > &m, const Vector_3< T > &v) |
Computes the product of a matrix and a vector. More... | |
template<typename T > | |
constexpr Point_3< T > | operator* (const Matrix_3< T > &m, const Point_3< T > &p) |
Computes the product of a matrix and a point. This is the same as a matrix-vector product. More... | |
template<typename T > | |
constexpr Matrix_3< T > | operator* (const Matrix_3< T > &a, const Matrix_3< T > &b) |
Computes the product of two matrices. More... | |
template<typename T > | |
constexpr Matrix_3< T > | operator* (const Matrix_3< T > &a, T s) |
Multiplies a matrix with a scalar value. More... | |
template<typename T > | |
constexpr Matrix_3< T > | operator* (T s, const Matrix_3< T > &a) |
Multiplies a matrix with a scalar value. More... | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &os, const Matrix_3< T > &m) |
Prints a matrix to a text output stream. More... | |
A 3x3 matrix.
The matrix is stored in column-major order. Matrix_3 is derived from std::array< Vector_3<T>, 3 >. Thus, it is an array of three column vectors.
|
inline |
Constructor that initializes all 9 elements of the matrix to the given values.
|
related |
Computes the product of a matrix and a vector.
|
related |
Computes the product of a matrix and a point. This is the same as a matrix-vector product.
|
related |
Computes the product of two matrices.
Multiplies a matrix with a scalar value.
Multiplies a matrix with a scalar value.
|
related |
Prints a matrix to a text output stream.