MyraMath
Public Member Functions | Static Public Member Functions | List of all members
myra::Matrix22< Number > Class Template Reference

Matrix type with fixed size 2x2. More...

#include <Matrix22.h>

Public Member Functions

 Matrix22 ()
 Default constructor, fills with zeroes.
 
 Matrix22 (const Matrix22< Number > &that)
 Copy constructor.
 
void swap (Matrix22< Number > &that)
 Member swap.
 
Matrix22< Number > & operator= (const Matrix22< Number > &that)
 Copy-assignment operator.
 
 Matrix22 (InputStream &in)
 InputStream constructor, complements write(OutputStream) method.
 
void write (OutputStream &out) const
 Writes to OutputStream, complements InputStream constructor.
 
void operator+= (const Matrix22< Number > &that)
 Adds this += that.
 
void operator-= (const Matrix22< Number > &that)
 Subtracts this -= that.
 
void operator*= (Number alpha)
 Scales this *= alpha.
 
void operator/= (Number alpha)
 Scales this /= alpha.
 
const CMatrixRange< Number > range () const
 Explicit conversion, returns a MatrixRange over all of *this.
 
const MatrixRange< Number > range ()
 Explicit conversion, returns a MatrixRange over all of *this.
 
 operator const CMatrixRange< Number > () const
 Implicit conversion into a MatrixRange.
 
 operator const MatrixRange< Number > ()
 Implicit conversion into a MatrixRange.
 
Number & operator() (int i, int j)
 Random access.
 
const Number & operator() (int i, int j) const
 Random access.
 

Static Public Member Functions

static Matrix22< Number > identity ()
 Generates an identity Matrix22.
 
static Matrix22< Number > random ()
 Generates a random Matrix22.
 
static Matrix22< Number > random_symmetric ()
 
static Matrix22< Number > random_hermitian ()
 
static Matrix22< Number > zeros ()
 Generates a zeros Matrix of specified size.
 
static Matrix22< Number > ones ()
 Generates a ones Matrix of specified size.
 
static Matrix22< Number > fill (Number c)
 Generates a Matrix of specified size filled with constant c.
 
static Matrix22< Number > fill_rmajor (Number a00, Number a01, Number a10, Number a11)
 Fills from four aij values in row major order, A = [a00 a01; a10 a11].
 
static Matrix22< Number > fill_cmajor (Number a00, Number a10, Number a01, Number a11)
 Fills from four aij values in column major order, A = [a00 a01; a10 a11].
 

Detailed Description

template<class Number>
class myra::Matrix22< Number >

Matrix type with fixed size 2x2.


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