|
0.12.0
|
|
Freundlich's C++ toolkit |
A class representing dynamic or static matrices.
| T | The matrix's value_type |
| N | The matrix's row type (this is not necessarily a number!) |
| M | The matrix's column type (this is not necessarily a number!) |
| S | The matrix's storage type |
See the module documentation for more information.
Public Types | |
| typedef N | n_wrapper |
A typedef for the N parameter. | |
| typedef M | m_wrapper |
A typedef for the M parameter. | |
| typedef boost::mpl::times< N, M >::type | dim_wrapper |
A typedef for the M and N parameters. | |
| typedef S | storage_type |
A typedef for the S parameter. | |
| typedef math::size_type | size_type |
| A type that counts the number of elements in a matrix. | |
| typedef math::difference_type | difference_type |
| A type that provides the difference between the addresses of two elements in a matrix. | |
| typedef T | value_type |
| A type that represents the data type stored in a matrix. | |
| typedef vector::object< T, N, matrix::detail::row_view< T, N > > | reference |
| A type that provides a reference to an element stored in a matrix. | |
| typedef fcppt::math::vector::object< T, N, fcppt::math::matrix::detail::row_view < T const, N > > | const_reference |
A type that provides a reference to a const element stored in a vector for reading and performing const operations. | |
| typedef T * | pointer |
| A type that provides a pointer to an element in a matrix. | |
| typedef T const * | const_pointer |
A type that provides a pointer to a const element in a matrix. | |
| typedef pointer | iterator |
| A type that provides a random-access iterator that can read or modify any element in a matrix. | |
| typedef const_pointer | const_iterator |
| A type that provides a random-access iterator that can read or modify any element in a matrix. | |
| typedef std::reverse_iterator < iterator > | reverse_iterator |
| A type that provides a random-access iterator that can read or modify any element in a reversed matrix. | |
| typedef std::reverse_iterator < const_iterator > | const_reverse_iterator |
A type that provides a random-access iterator that can read any const element in the matrix. | |
| typedef matrix::dim_type | dim |
| The dim type corresponding to this matrix type. | |
Public Member Functions | |
| FCPPT_STATIC_ASSERT_STATEMENT ((boost::is_same< typename N::value_type, typename M::value_type >::value)) | |
| object () | |
| Construct an uninitialized matrix. | |
| object (dim const &) | |
| Construct an uninitialized dynamic matrix. | |
| object (storage_type const &s) | |
| Construct a vector from a storage source. | |
| object (object const &) | |
| Copy-construct the matrix from another matrix. | |
| template<typename OtherStorage > | |
| object (object< T, N, M, OtherStorage > const &) | |
| Create a matrix from a matrix with the same dimension and value type but different storage type. | |
| template<typename In > | |
| object (In beg, typename boost::enable_if< type_traits::is_iterator< In >, In >::type end) | |
| Create a matrix and fill it with the contents of the given range. | |
| template<typename In > | |
| object (dim const &_dim, In beg, typename boost::enable_if< type_traits::is_iterator< In >, In >::type end) | |
| Create a dynamic matrix and fill it with the contents of the given range. | |
| template<typename Container > | |
| object (dim const &, Container const &) | |
| Create a dynamic matrix and fill it with the contents of a range. | |
| FCPPT_MATH_DETAIL_ARRAY_ADAPTER (object) FCPPT_MATH_DETAIL_MAKE_VARIADIC_CONSTRUCTOR_DECL(FCPPT_MATH_MATRIX_MAX_CTOR_PARAMS | |
| object object & | operator= (object const &) |
| Copy the values from a different matrix. | |
| template<typename OtherStorage > | |
| object & | operator= (object< T, N, M, OtherStorage > const &) |
| Copy the values from a different matrix of the same size but different storage type. | |
| ~object () | |
| object & | operator*= (value_type const &) |
| Multiply a matrix by a scalar. | |
| object & | operator/= (value_type const &) |
| Divide a matrix by a scalar. | |
| reference | operator[] (size_type) |
| Returns a reference to a row in the matrix. | |
| const_reference const | operator[] (size_type) const |
| Returns a reference to a (constant) row in the matrix. | |
| size_type | rows () const |
| Returns the number of rows in the matrix. | |
| size_type | columns () const |
| Returns the number of columns in the matrix. | |
| dim const | dimension () const |
| Returns the matrix's dimensions. | |
| void | swap (object &) |
| Exchanges the elements of two matrices. | |
Static Public Member Functions | |
| static object const | identity () |
| Returns the identity matrix;. | |
| typedef const_pointer fcppt::math::matrix::object< T, N, M, S >::const_iterator |
A type that provides a random-access iterator that can read or modify any element in a matrix.
| typedef T const* fcppt::math::matrix::object< T, N, M, S >::const_pointer |
A type that provides a pointer to a const element in a matrix.
| typedef fcppt::math::vector::object< T, N, fcppt::math::matrix::detail::row_view< T const, N > > fcppt::math::matrix::object< T, N, M, S >::const_reference |
A type that provides a reference to a const element stored in a vector for reading and performing const operations.
This is one of the few non-trivial implementations of the reference typedef, as it's really a vector that models a row-view over the matrix, see the explanation above.
| typedef std::reverse_iterator<const_iterator> fcppt::math::matrix::object< T, N, M, S >::const_reverse_iterator |
A type that provides a random-access iterator that can read any const element in the matrix.
| typedef math::difference_type fcppt::math::matrix::object< T, N, M, S >::difference_type |
A type that provides the difference between the addresses of two elements in a matrix.
| typedef matrix::dim_type fcppt::math::matrix::object< T, N, M, S >::dim |
The dim type corresponding to this matrix type.
| typedef boost::mpl::times< N, M >::type fcppt::math::matrix::object< T, N, M, S >::dim_wrapper |
A typedef for the M and N parameters.
| typedef pointer fcppt::math::matrix::object< T, N, M, S >::iterator |
A type that provides a random-access iterator that can read or modify any element in a matrix.
| typedef M fcppt::math::matrix::object< T, N, M, S >::m_wrapper |
A typedef for the M parameter.
| typedef N fcppt::math::matrix::object< T, N, M, S >::n_wrapper |
A typedef for the N parameter.
| typedef T* fcppt::math::matrix::object< T, N, M, S >::pointer |
A type that provides a pointer to an element in a matrix.
| typedef vector::object< T, N, matrix::detail::row_view< T, N > > fcppt::math::matrix::object< T, N, M, S >::reference |
A type that provides a reference to an element stored in a matrix.
This is one of the few non-trivial implementations of the reference typedef, as it's really a vector that models a row-view over the matrix, see the explanation above.
| typedef std::reverse_iterator<iterator> fcppt::math::matrix::object< T, N, M, S >::reverse_iterator |
A type that provides a random-access iterator that can read or modify any element in a reversed matrix.
| typedef math::size_type fcppt::math::matrix::object< T, N, M, S >::size_type |
A type that counts the number of elements in a matrix.
| typedef S fcppt::math::matrix::object< T, N, M, S >::storage_type |
A typedef for the S parameter.
| typedef T fcppt::math::matrix::object< T, N, M, S >::value_type |
A type that represents the data type stored in a matrix.
| FCPPT_PP_PUSH_WARNING object< T, N, M, S >::object | ( | ) |
Construct an uninitialized matrix.
|
explicit |
Construct an uninitialized dynamic matrix.
|
explicit |
Construct a vector from a storage source.
| s | The storage source to copy from |
| object< T, N, M, S >::object | ( | object< T, N, M, S > const & | _other | ) |
Copy-construct the matrix from another matrix.
| FCPPT_PP_PUSH_WARNING object< T, N, M, S >::object | ( | object< T, N, M, OtherStorage > const & | _other | ) |
Create a matrix from a matrix with the same dimension and value type but different storage type.
| OtherStorage | The other matrix's storage type |
| object< T, N, M, S >::object | ( | In | beg, |
| typename boost::enable_if< type_traits::is_iterator< In >, In >::type | end | ||
| ) |
Create a matrix and fill it with the contents of the given range.
| In | A forward iterator pointing to elements of type T |
| beg | The beginning of the range |
| end | One past the end of the range |
| object< T, N, M, S >::object | ( | dim const & | _dim, |
| In | beg, | ||
| typename boost::enable_if< type_traits::is_iterator< In >, In >::type | end | ||
| ) |
Create a dynamic matrix and fill it with the contents of the given range.
| In | A forward iterator pointing to elements of type T |
| _dim | The two-dimensional dimension corresponding to the one-dimensional range |
| beg | The beginning of the range |
| end | One past the end of the range |
| object< T, N, M, S >::object | ( | dim const & | _dim, |
| Container const & | _container | ||
| ) |
Create a dynamic matrix and fill it with the contents of a range.
| Container | A sequence container containing elements of type T |
| fcppt::math::matrix::object< T, N, M, S >::size_type object< T, N, M, S >::columns | ( | ) | const |
Returns the number of columns in the matrix.
| fcppt::math::matrix::object< T, N, M, S >::dim const object< T, N, M, S >::dimension | ( | ) | const |
Returns the matrix's dimensions.
| fcppt::math::matrix::object< T, N, M, S >::FCPPT_MATH_DETAIL_ARRAY_ADAPTER | ( | object< T, N, M, S > | ) |
| fcppt::math::matrix::object< T, N, M, S >::FCPPT_STATIC_ASSERT_STATEMENT | ( | (boost::is_same< typename N::value_type, typename M::value_type >::value) | ) |
|
static |
Returns the identity matrix;.
| fcppt::math::matrix::object< T, N, M, S > & object< T, N, M, S >::operator*= | ( | value_type const & | _value | ) |
Multiply a matrix by a scalar.
| fcppt::math::matrix::object< T, N, M, S > & object< T, N, M, S >::operator/= | ( | value_type const & | _value | ) |
Divide a matrix by a scalar.
| FCPPT_PP_POP_WARNING fcppt::math::matrix::object< T, N, M, S >::object FCPPT_PP_POP_WARNING fcppt::math::matrix::object< T, N, M, S > & object< T, N, M, S >::operator= | ( | object< T, N, M, S > const & | _other | ) |
Copy the values from a different matrix.
| fcppt::math::matrix::object< T, N, M, S > & object< T, N, M, S >::operator= | ( | object< T, N, M, OtherStorage > const & | _other | ) |
Copy the values from a different matrix of the same size but different storage type.
| OtherStorage | The other matrix's storage type |
| fcppt::math::matrix::object< T, N, M, S >::reference object< T, N, M, S >::operator[] | ( | size_type | _j | ) |
Returns a reference to a row in the matrix.
| fcppt::math::matrix::object< T, N, M, S >::const_reference const object< T, N, M, S >::operator[] | ( | size_type | _j | ) | const |
Returns a reference to a (constant) row in the matrix.
| fcppt::math::matrix::object< T, N, M, S >::size_type object< T, N, M, S >::rows | ( | ) | const |
Returns the number of rows in the matrix.
1.8.2