boca::Matrix2< Value_ > Class Template Reference

Two dimensional matrix. More...

#include <Matrix2.hh>

Inheritance diagram for boca::Matrix2< Value_ >:
[legend]
Collaboration diagram for boca::Matrix2< Value_ >:
[legend]

Public Member Functions

constexpr Vector2< Value_ > const & Y () const
 y More...
 
Vector2< Value_ > & Y ()
 
Constructor
constexpr Matrix2 ()
 Default constructor. More...
 
 Matrix2 (Value_ scalar, Matrix matrix=Matrix::diagonal)
 Diagonal Matrix. More...
 
 Matrix2 (Vector2< Value_ > const &vector_1, Vector2< Value_ > const &vector_2, Matrix matrix=Matrix::row)
 Constructor accepting two vectors. More...
 
template<typename Value_2 >
constexpr Matrix2 (Matrix2< Value_2 > const &matrix)
 Constructor with type conversion. More...
 
Setter
Matrix2SetToIdentity ()
 Set equal to the identity rotation. More...
 
Matrix2SetDiagonal (Value_ value)
 Set diagonal. More...
 
Matrix2SetUniform (Value_ value)
 Set uniform. More...
 
void SetRows (Vector2< Value_ > const &x, Vector2< Value_ > const &y)
 Set rows. More...
 
void SetColumns (Vector2< Value_ > const &x, Vector2< Value_ > const &y)
 Set columns. More...
 
Accessor and getter
constexpr Vector2< Value_ > const & X () const
 x More...
 
Vector2< Value_ > & X ()
 x More...
 
Angles
Angle PhiX () const
 Phi x. More...
 
Angle PhiY () const
 Phi y. More...
 
Scalars
constexpr Value_ Trace () const
 Trace. More...
 
constexpr ValueSquare Determinant () const
 Determinant. More...
 
constexpr Value_ Minor (Dim2 delete_1, Dim2 delete_2) const
 Minor. More...
 
Vectors
constexpr Vector2< Value_ > ColumnX () const
 x column More...
 
constexpr Vector2< Value_ > ColumnY () const
 y column More...
 
Matrices
constexpr Matrix2 Transposed () const
 transposed More...
 
constexpr Matrix2Transpose ()
 transpose this matrix More...
 
constexpr Matrix2< ValueInverse > Inverse ()
 inverse of this matrix More...
 
Matrix2Rotate (Angle const &phi)
 Rotation. More...
 
Products
template<typename Value_2_ >
constexpr Matrix2< ValueProduct< Value_2_ > > Scale (Value_2_ scalar) const
 scale with a scalar More...
 
template<typename Value_2_ >
constexpr Matrix2< ValueProduct< Value_2_ > > Multiply (Matrix2< Value_2_ > const &matrix) const
 multiply with a matrix More...
 
template<typename Value_2_ >
constexpr Vector2< ValueProduct< Value_2_ > > Multiply (Vector2< Value_2_ > const &vector) const
 multiply with a vector More...
 
constexpr Matrix2< ValueSquare > Square () const
 Square. More...
 
Eigen system
constexpr Array2< Value_ > EigenValues () const
 Eigen values. More...
 
constexpr Array2< Vector2< Value_ > > EigenVectors () const
 Eigen vectors. More...
 
constexpr Array2< GradedVector2< Value_ > > EigenSystem () const
 Eigen system. More...
 

Operators

constexpr bool operator< (Matrix2 const &matrix) const
 Less than comparison according to absolute value of the determinant. More...
 
constexpr bool operator== (Matrix2 const &matrix) const
 Equality comparison. More...
 
template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>>
Matrix2operator+= (Matrix2< Value_2 > const &matrix)
 Addition. More...
 
template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>>
Matrix2operator-= (Matrix2< Value_2 > const &matrix)
 Substraction. More...
 
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>>
Matrix2< ValueQuotient< Value_2_ > > operator/= (Value_2_ scalar)
 Division by scalar. More...
 
template<typename Value_2_ >
constexpr Matrix2< ValueQuotient< Value_2_ > > operator/ (Value_2_ scalar)
 Division by scalar. More...
 
template<typename Value_2_ , typename = OnlyIfNotQuantity<Value_2_>>
Matrix2operator*= (Matrix2< Value_2_ > const &matrix)
 Multiplication with a matrix. More...
 
template<typename Value_2_ >
constexpr Matrix2< ValueProduct< Value_2_ > > operator* (Matrix2< Value_2_ > const &matrix) const
 Multiplication with a matrix. More...
 
template<typename Value_2_ >
constexpr Vector2< ValueProduct< Value_2_ > > operator* (Vector2< Value_2_ > const &vector) const
 Multiplication with a Vector. More...
 
constexpr Vector2< Value_ > const & operator[] (Dim2 dim_2) const
 rows More...
 
Vector2< Value_ > & operator[] (Dim2 dim_2)
 rows More...
 
auto & operator<< (std::ostream &stream, Matrix2< Value_ > const &matrix)
 Output stream operator. More...
 

Iterators

using Dimension = Dim2
 const begin More...
 
constexpr ConstSubIterator< boca::Matrix2, Vector2, Value_ > begin () const
 const begin More...
 
constexpr ConstSubIterator< boca::Matrix2, Vector2, Value_ > end () const
 const end More...
 
SubIterator< boca::Matrix2, Vector2, Value_ > begin ()
 begin More...
 
SubIterator< boca::Matrix2, Vector2, Value_ > end ()
 end More...
 

Detailed Description

template<typename Value_>
class boca::Matrix2< Value_ >

Two dimensional matrix.

Member Typedef Documentation

template<typename Value_>
using boca::Matrix2< Value_ >::Dimension = Dim2

const begin

Constructor & Destructor Documentation

template<typename Value_>
constexpr boca::Matrix2< Value_ >::Matrix2 ( )
inline

Default constructor.

template<typename Value_>
boca::Matrix2< Value_ >::Matrix2 ( Value_  scalar,
Matrix  matrix = Matrix::diagonal 
)
inline

Diagonal Matrix.

template<typename Value_>
boca::Matrix2< Value_ >::Matrix2 ( Vector2< Value_ > const &  vector_1,
Vector2< Value_ > const &  vector_2,
Matrix  matrix = Matrix::row 
)
inline

Constructor accepting two vectors.

template<typename Value_>
template<typename Value_2 >
constexpr boca::Matrix2< Value_ >::Matrix2 ( Matrix2< Value_2 > const &  matrix)
inline

Constructor with type conversion.

Member Function Documentation

template<typename Value_>
constexpr ConstSubIterator<boca::Matrix2, Vector2, Value_> boca::Matrix2< Value_ >::begin ( ) const
inline

const begin

template<typename Value_>
SubIterator<boca::Matrix2, Vector2, Value_> boca::Matrix2< Value_ >::begin ( )
inline

begin

template<typename Value_>
constexpr Vector2<Value_> boca::Matrix2< Value_ >::ColumnX ( ) const
inline

x column

template<typename Value_>
constexpr Vector2<Value_> boca::Matrix2< Value_ >::ColumnY ( ) const
inline

y column

template<typename Value_>
constexpr ValueSquare boca::Matrix2< Value_ >::Determinant ( ) const
inline

Determinant.

template<typename Value_>
constexpr Array2<GradedVector2<Value_> > boca::Matrix2< Value_ >::EigenSystem ( ) const
inline

Eigen system.

template<typename Value_>
constexpr Array2<Value_> boca::Matrix2< Value_ >::EigenValues ( ) const
inline

Eigen values.

template<typename Value_>
constexpr Array2<Vector2<Value_> > boca::Matrix2< Value_ >::EigenVectors ( ) const
inline

Eigen vectors.

template<typename Value_>
constexpr ConstSubIterator<boca::Matrix2, Vector2, Value_> boca::Matrix2< Value_ >::end ( ) const
inline

const end

template<typename Value_>
SubIterator<boca::Matrix2, Vector2, Value_> boca::Matrix2< Value_ >::end ( )
inline

end

template<typename Value_>
constexpr Matrix2<ValueInverse> boca::Matrix2< Value_ >::Inverse ( )
inline

inverse of this matrix

template<typename Value_>
constexpr Value_ boca::Matrix2< Value_ >::Minor ( Dim2  delete_1,
Dim2  delete_2 
) const
inline

Minor.

template<typename Value_>
template<typename Value_2_ >
constexpr Matrix2<ValueProduct<Value_2_> > boca::Matrix2< Value_ >::Multiply ( Matrix2< Value_2_ > const &  matrix) const
inline

multiply with a matrix

template<typename Value_>
template<typename Value_2_ >
constexpr Vector2<ValueProduct<Value_2_> > boca::Matrix2< Value_ >::Multiply ( Vector2< Value_2_ > const &  vector) const
inline

multiply with a vector

template<typename Value_>
template<typename Value_2_ >
constexpr Matrix2<ValueProduct<Value_2_> > boca::Matrix2< Value_ >::operator* ( Matrix2< Value_2_ > const &  matrix) const
inline

Multiplication with a matrix.

template<typename Value_>
template<typename Value_2_ >
constexpr Vector2<ValueProduct<Value_2_> > boca::Matrix2< Value_ >::operator* ( Vector2< Value_2_ > const &  vector) const
inline

Multiplication with a Vector.

template<typename Value_>
template<typename Value_2_ , typename = OnlyIfNotQuantity<Value_2_>>
Matrix2& boca::Matrix2< Value_ >::operator*= ( Matrix2< Value_2_ > const &  matrix)
inline

Multiplication with a matrix.

template<typename Value_>
template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>>
Matrix2& boca::Matrix2< Value_ >::operator+= ( Matrix2< Value_2 > const &  matrix)
inline

Addition.

template<typename Value_>
template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>>
Matrix2& boca::Matrix2< Value_ >::operator-= ( Matrix2< Value_2 > const &  matrix)
inline

Substraction.

template<typename Value_>
template<typename Value_2_ >
constexpr Matrix2<ValueQuotient<Value_2_> > boca::Matrix2< Value_ >::operator/ ( Value_2_  scalar)
inline

Division by scalar.

template<typename Value_>
template<typename Value_2_ , typename = OnlyIfNotOrSameQuantity<Value_2_>>
Matrix2<ValueQuotient<Value_2_> > boca::Matrix2< Value_ >::operator/= ( Value_2_  scalar)
inline

Division by scalar.

template<typename Value_>
constexpr bool boca::Matrix2< Value_ >::operator< ( Matrix2< Value_ > const &  matrix) const
inline

Less than comparison according to absolute value of the determinant.

template<typename Value_>
constexpr bool boca::Matrix2< Value_ >::operator== ( Matrix2< Value_ > const &  matrix) const
inline

Equality comparison.

template<typename Value_>
constexpr Vector2<Value_> const& boca::Matrix2< Value_ >::operator[] ( Dim2  dim_2) const
inline

rows

template<typename Value_>
Vector2<Value_>& boca::Matrix2< Value_ >::operator[] ( Dim2  dim_2)
inline

rows

template<typename Value_>
Angle boca::Matrix2< Value_ >::PhiX ( ) const
inline

Phi x.

template<typename Value_>
Angle boca::Matrix2< Value_ >::PhiY ( ) const
inline

Phi y.

template<typename Value_>
Matrix2& boca::Matrix2< Value_ >::Rotate ( Angle const &  phi)
inline

Rotation.

template<typename Value_>
template<typename Value_2_ >
constexpr Matrix2<ValueProduct<Value_2_> > boca::Matrix2< Value_ >::Scale ( Value_2_  scalar) const
inline

scale with a scalar

template<typename Value_>
void boca::Matrix2< Value_ >::SetColumns ( Vector2< Value_ > const &  x,
Vector2< Value_ > const &  y 
)
inline

Set columns.

template<typename Value_>
Matrix2& boca::Matrix2< Value_ >::SetDiagonal ( Value_  value)
inline

Set diagonal.

template<typename Value_>
void boca::Matrix2< Value_ >::SetRows ( Vector2< Value_ > const &  x,
Vector2< Value_ > const &  y 
)
inline

Set rows.

template<typename Value_>
Matrix2& boca::Matrix2< Value_ >::SetToIdentity ( )
inline

Set equal to the identity rotation.

template<typename Value_>
Matrix2& boca::Matrix2< Value_ >::SetUniform ( Value_  value)
inline

Set uniform.

template<typename Value_>
constexpr Matrix2<ValueSquare> boca::Matrix2< Value_ >::Square ( ) const
inline

Square.

template<typename Value_>
constexpr Value_ boca::Matrix2< Value_ >::Trace ( ) const
inline

Trace.

template<typename Value_>
constexpr Matrix2& boca::Matrix2< Value_ >::Transpose ( )
inline

transpose this matrix

template<typename Value_>
constexpr Matrix2 boca::Matrix2< Value_ >::Transposed ( ) const
inline

transposed

template<typename Value_>
constexpr Vector2<Value_> const& boca::Matrix2< Value_ >::X ( ) const
inline

x

template<typename Value_>
Vector2<Value_>& boca::Matrix2< Value_ >::X ( )
inline

x

template<typename Value_>
constexpr Vector2<Value_> const& boca::Matrix2< Value_ >::Y ( ) const
inline

y

template<typename Value_>
Vector2<Value_>& boca::Matrix2< Value_ >::Y ( )
inline

Friends And Related Function Documentation

template<typename Value_>
auto& operator<< ( std::ostream &  stream,
Matrix2< Value_ > const &  matrix 
)
friend

Output stream operator.


The documentation for this class was generated from the following file: