namespace fcppt
{
namespace math
{
/**
\brief Contains #fcppt::math::matrix::object matrix::object  and helper functions, classes and types for it
*/
namespace matrix
{
}
}
}

/**
\defgroup fcpptmathmatrix fcppt.math.matrix
\ingroup fcpptmath
\brief A class representing static n times m-dimensional matrices

<table id="toc">
<tr>
<td>

<ul>
	<li>\ref fcpptmathmatrix_motivation</li>
	<li>\ref fcpptmathmatrix_constructor</li>
	<li>\ref fcpptmathmatrix_operators</li>
	<li>\ref fcpptmathmatrix_representation</li>
	<li>\ref fcpptmathmatrix_identity</li>
	<li>\ref fcpptmathmatrix_headers</li>
</ul>

</td>
</tr>
</table>

\section fcpptmathmatrix_motivation Motivation

Matrices are ubiquitous in mathematics and computer science. Often, matrices
represent linear operations and are applied to accordingly-sized vectors.

\section fcpptmathmatrix_constructor Constructor

A matrix can be constructed using a variadic constructor which takes the matrix
components in row-major order. This way, you can arrange the matrix's
components nicely in the source code, as seen in the following example:

\snippet math/matrix.cpp decl

\section fcpptmathmatrix_operators Operators

Matrix defines addition, subtraction, multiplication, scalar multiplication and
multiplication by a vector.

Multiplication of two matrices is special: An <code>M1</code> by <code>N</code>
matrix multiplied by an <code>N</code> by <code>M2</code> matrix results in an
<code>M1</code> by <code>M2</code> matrix.

\snippet math/matrix.cpp arithmetic_mul

Matrices can also be multiplied by a vector: An <code>R</code> by
<code>C</code> matrix multiplied by a <code>C</code> vector yields an
<code>R</code> vector. This operation is defined in
<code>fcppt/math/matrix/vector.hpp</code>.

\snippet math/matrix.cpp arithmetic_vector

\section fcpptmathmatrix_representation Representation

The matrix's internal representation is row-major, which means that a row is
represented as a contiguous chunk of memory. Consequently,
<code>operator[]</code> takes the <em>row number</em> and returns a row,
which is represented as an #fcppt::math::vector::object using a
view as storage type. Here is an example:

\snippet math/matrix.cpp row_iterate

\section fcpptmathmatrix_identity Identity

To get the identity matrix, use the #fcppt::math::matrix::identity function:

\snippet math/matrix.cpp identity

\section fcpptmathmatrix_headers Header files

<table>
<tr>
<th>Header file</th>
<th>Description</th>
</tr>
<tr>
<td><code>object_fwd.hpp</code></td>
<td>Contains #fcppt::math::matrix::object's declaration.</td>
</tr>
<tr>
<td><code>object_decl.hpp</code></td>
<td>Contains #fcppt::math::matrix::object's definition.</td>
</tr>
<tr>
<td><code>object_impl.hpp</code></td>
<td>Contains the definition of #fcppt::math::matrix::object's member functions.</td>
</tr>
<tr>
<td><code>object.hpp</code></td>
<td>Includes <code>object_fwd.hpp</code>, <code>object_decl.hpp</code> and <code>object_impl.hpp</code>.</td>
</tr>
<tr>
<td><code>arithmetic.hpp</code></td>
<td>Contains symmetric and scalar arithmetic operators.</td>
</tr>
<tr>
<td><code>comparison.hpp</code></td>
<td>Contains all comparison operators.</td>
</tr>
<tr>
<td><code>output.hpp</code></td>
<td>Contains <code>operator<<</code>.</td>
</tr>
<tr>
<td><code>vector.hpp</code></td>
<td>Contains <code>operator*</code> for #fcppt::math::vector::object.</td>
</tr>
</table>
*/
