|
5.0.0
Freundlich's C++ toolkit
|
A class representing a static matrix.
Represents a static R by C matrix, which is a matrix consisting of R rows and C columns.
| T | The matrix's value_type |
| R | The number of rows |
| C | The number of columns |
| S | The matrix's storage type |
See fcppt.math.matrix for more information.
Public Types | |
| using | static_rows = fcppt::math::static_size<R> |
| using | static_columns = fcppt::math::static_size<C> |
| using | static_size = static_rows |
| using | dim_wrapper = fcppt::math::static_size<static_rows::value * static_columns::value> |
| using | storage_type = S |
A typedef for the S parameter. | |
| using | size_type = fcppt::math::size_type |
| A type that counts the number of elements in a matrix. | |
| using | difference_type = fcppt::math::difference_type |
| A type that provides the difference between the addresses of two elements in a matrix. | |
| using | value_type = T |
| A type that represents the data type stored in a matrix. | |
| using | reference |
| A reference to a row of the matrix. | |
| using | inner_reference = typename reference::reference |
| A reference to an element of the matrix. | |
| using | const_reference |
| A const reference to a row of the matrix. | |
| using | const_inner_reference = typename const_reference::const_reference |
| A const reference to an element of the matrix. | |
| using | row_type = fcppt::math::matrix::row_type<T, C> |
The type of a row, which is a vector of C elements. | |
Public Member Functions | |
| object (fcppt::no_init const &) | |
| Construct an uninitialized matrix. | |
| object (storage_type &&) | |
| Construct a matrix from a storage source. | |
| template<typename... Args> requires (std::conjunction_v< std::bool_constant<sizeof...(Args) == R>, std::is_same<fcppt::math::matrix::row_type<T, C>, std::remove_cvref_t<Args>>...>) | |
| object (Args &&...) | |
Constructs a matrix from R rows. | |
| template<typename OtherStorage> | |
| object (fcppt::math::matrix::object< T, R, C, OtherStorage > const &) | |
| Create a matrix from a matrix with the same dimension and value type but different storage type. | |
| template<typename OtherStorage> | |
| object & | operator= (fcppt::math::matrix::object< T, R, C, OtherStorage > const &) |
| Copy the values from a different matrix of the same size but different storage type. | |
| template<typename S2> | |
| object & | operator+= (object< T, R, C, S2 > const &) |
| template<typename S2> | |
| object & | operator-= (object< T, R, C, S2 > const &) |
| object & | operator*= (value_type const &) |
| Multiply a matrix by a scalar. | |
| reference | get_unsafe (size_type) |
| Returns a reference to a row in the matrix. | |
| const_reference | get_unsafe (size_type) const |
| Returns a reference to a (constant) row in the matrix. | |
| S & | storage () |
| S const & | storage () const |
| inner_reference | m00 () |
| const_inner_reference | m00 () const |
| inner_reference | m01 () |
| const_inner_reference | m01 () const |
| inner_reference | m02 () |
| const_inner_reference | m02 () const |
| inner_reference | m03 () |
| const_inner_reference | m03 () const |
| inner_reference | m10 () |
| const_inner_reference | m10 () const |
| inner_reference | m11 () |
| const_inner_reference | m11 () const |
| inner_reference | m12 () |
| const_inner_reference | m12 () const |
| inner_reference | m13 () |
| const_inner_reference | m13 () const |
| inner_reference | m20 () |
| const_inner_reference | m20 () const |
| inner_reference | m21 () |
| const_inner_reference | m21 () const |
| inner_reference | m22 () |
| const_inner_reference | m22 () const |
| inner_reference | m23 () |
| const_inner_reference | m23 () const |
| inner_reference | m30 () |
| const_inner_reference | m30 () const |
| inner_reference | m31 () |
| const_inner_reference | m31 () const |
| inner_reference | m32 () |
| const_inner_reference | m32 () const |
| inner_reference | m33 () |
| const_inner_reference | m33 () const |
Static Public Member Functions | |
| static constexpr size_type | rows () |
| Returns the number of rows in the matrix. | |
| static constexpr size_type | columns () |
| Returns the number of columns in the matrix. | |
| using fcppt::math::matrix::object< T, R, C, S >::const_inner_reference = typename const_reference::const_reference |
A const reference to an element of the matrix.
| using fcppt::math::matrix::object< T, R, C, S >::const_reference |
A const reference to a row of the matrix.
| using fcppt::math::matrix::object< T, R, C, S >::difference_type = fcppt::math::difference_type |
A type that provides the difference between the addresses of two elements in a matrix.
| using fcppt::math::matrix::object< T, R, C, S >::dim_wrapper = fcppt::math::static_size<static_rows::value * static_columns::value> |
| using fcppt::math::matrix::object< T, R, C, S >::inner_reference = typename reference::reference |
A reference to an element of the matrix.
| using fcppt::math::matrix::object< T, R, C, S >::reference |
A reference to a row of the matrix.
| using fcppt::math::matrix::object< T, R, C, S >::row_type = fcppt::math::matrix::row_type<T, C> |
The type of a row, which is a vector of C elements.
| using fcppt::math::matrix::object< T, R, C, S >::size_type = fcppt::math::size_type |
A type that counts the number of elements in a matrix.
| using fcppt::math::matrix::object< T, R, C, S >::static_columns = fcppt::math::static_size<C> |
| using fcppt::math::matrix::object< T, R, C, S >::static_rows = fcppt::math::static_size<R> |
| using fcppt::math::matrix::object< T, R, C, S >::static_size = static_rows |
| using fcppt::math::matrix::object< T, R, C, S >::storage_type = S |
A typedef for the S parameter.
| using fcppt::math::matrix::object< T, R, C, S >::value_type = T |
A type that represents the data type stored in a matrix.
|
explicit |
Construct an uninitialized matrix.
|
explicit |
Construct a matrix from a storage source.
|
explicit |
Constructs a matrix from R rows.
Constructs a matrix by using R arguments of type fcppt::math::matrix::object::row_type. You can use fcppt::math::matrix::row to create them.
|
explicit |
Create a matrix from a matrix with the same dimension and value type but different storage type.
| OtherStorage | The other matrix's storage type |
|
staticnodiscardconstexpr |
Returns the number of columns in the matrix.
|
nodiscard |
Returns a reference to a row in the matrix.
|
nodiscard |
Returns a reference to a (constant) row in the matrix.
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
| object & fcppt::math::matrix::object< T, R, C, S >::operator*= | ( | value_type const & | ) |
Multiply a matrix by a scalar.
| object & fcppt::math::matrix::object< T, R, C, S >::operator+= | ( | object< T, R, C, S2 > const & | ) |
| object & fcppt::math::matrix::object< T, R, C, S >::operator-= | ( | object< T, R, C, S2 > const & | ) |
| object & fcppt::math::matrix::object< T, R, C, S >::operator= | ( | fcppt::math::matrix::object< T, R, C, OtherStorage > const & | ) |
Copy the values from a different matrix of the same size but different storage type.
| OtherStorage | The other matrix's storage type |
|
staticnodiscardconstexpr |
Returns the number of rows in the matrix.
|
nodiscard |
|
nodiscard |