Matrix2 Class Reference

2x2 Matrix class More...

#include <matrix3.h>

List of all members.

Public Member Functions

double determinant ()
 Determinant of matrix.
void identity ()
 Set Matrix to Identity Matrix.
Matrix2 invert ()
 Invert a matrix.
 Matrix2 (const Matrix2 &m)
 Copy Constructor.
 Matrix2 ()
 Constructor Initialising to Identity Matrix.
double & operator() (int r, int c)
 Element Access.
Matrix2 operator* (double v)
 Scalar matrix multiplication.
Vector2 operator* (const Vector2 &v)
 Matrix Vector multiplication.
Matrix2 operator* (const Matrix2 &m)
 Matrix Multiplication.
Matrix2operator*= (double v)
 Scalar matrix multiplication and output into itself.
Matrix2operator+= (double v)
 Add scalar to every matrix element and output into itself.
Matrix2operator+= (const Matrix2 &m)
 Matrix Addition and output into itself.
Matrix2operator= (double v)
 Set all Matrix Elements to scalar value.
Matrix2operator= (const Matrix2 &m)
 Copy Matrix values from new matrix.
Vector2 operator[] (int idx) const
 Row Element Access.
Vector2operator[] (int idx)
 Row Element Access.

Public Attributes

Vector2 x [2]
 Storage for 2 x 2 Matrix.

Friends

std::ostream & operator<< (std::ostream &os, const Matrix2 &m)
 Print out matrix.

Detailed Description

2x2 Matrix class

Definition at line 234 of file matrix3.h.


Constructor & Destructor Documentation

Matrix2::Matrix2 (  )  [inline]

Constructor Initialising to Identity Matrix.

Definition at line 240 of file matrix3.h.

Matrix2::Matrix2 ( const Matrix2 m  )  [inline]

Copy Constructor.

Parameters:
m 2x2 Matrix

Definition at line 247 of file matrix3.h.


Member Function Documentation

double Matrix2::determinant (  )  [inline]

Determinant of matrix.

Returns:
Determinant

Definition at line 294 of file matrix3.h.

void Matrix2::identity (  )  [inline]

Set Matrix to Identity Matrix.

Definition at line 262 of file matrix3.h.

Matrix2 Matrix2::invert (  )  [inline]

Invert a matrix.

Returns:
Inverted Matrix

Definition at line 300 of file matrix3.h.

double& Matrix2::operator() ( int  r,
int  c 
) [inline]

Element Access.

Parameters:
r row index
c column index
Returns:
element value

Definition at line 288 of file matrix3.h.

Matrix2 Matrix2::operator* ( double  v  )  [inline]

Scalar matrix multiplication.

Parameters:
v Scalar value to be multiplied with
Returns:
Result Matrix

Definition at line 337 of file matrix3.h.

Vector2 Matrix2::operator* ( const Vector2 v  )  [inline]

Matrix Vector multiplication.

Parameters:
v Vector to be multiplied with
Returns:
Result Vector

Definition at line 327 of file matrix3.h.

Matrix2 Matrix2::operator* ( const Matrix2 m  )  [inline]

Matrix Multiplication.

Parameters:
m Matrix to be multiplied with
Returns:
Result Matrix

Definition at line 316 of file matrix3.h.

Matrix2& Matrix2::operator*= ( double  v  )  [inline]

Scalar matrix multiplication and output into itself.

Parameters:
v Scalar value to be multiplied with
Returns:
Result Matrix

Definition at line 356 of file matrix3.h.

Matrix2& Matrix2::operator+= ( double  v  )  [inline]

Add scalar to every matrix element and output into itself.

Parameters:
v Scalar value to be added
Returns:
Result Matrix

Definition at line 374 of file matrix3.h.

Matrix2& Matrix2::operator+= ( const Matrix2 m  )  [inline]

Matrix Addition and output into itself.

Parameters:
m Matrix to be added
Returns:
Result Matrix

Definition at line 365 of file matrix3.h.

Matrix2& Matrix2::operator= ( double  v  )  [inline]

Set all Matrix Elements to scalar value.

Parameters:
v Scalar value to be set to
Returns:
Result Matrix

Definition at line 347 of file matrix3.h.

Matrix2& Matrix2::operator= ( const Matrix2 m  )  [inline]

Copy Matrix values from new matrix.

Parameters:
m 2x2 Matrix

Definition at line 255 of file matrix3.h.

Vector2 Matrix2::operator[] ( int  idx  )  const [inline]

Row Element Access.

Parameters:
idx row index
Returns:
row as two dimensional vector

Definition at line 279 of file matrix3.h.

Vector2& Matrix2::operator[] ( int  idx  )  [inline]

Row Element Access.

Parameters:
idx row index
Returns:
row as two dimensional vector

Definition at line 271 of file matrix3.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Matrix2 m 
) [friend]

Print out matrix.

Parameters:
os output stream
m Matrix to be printed
Returns:
Matrix printed to output stream

Definition at line 385 of file matrix3.h.


Member Data Documentation

Storage for 2 x 2 Matrix.

Definition at line 237 of file matrix3.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Friends Defines


active_realtime_segmentation
Author(s): Marten Bjorkman. Maintained by Jeannette Bohg
autogenerated on Fri Jan 11 09:51:13 2013