Public Member Functions | Public Attributes | Friends
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 ()
 Constructor Initialising to Identity Matrix.
 Matrix2 (const Matrix2 &m)
 Copy Constructor.
double & operator() (int r, int c)
 Element Access.
Matrix2 operator* (const Matrix2 &m)
 Matrix Multiplication.
Vector2 operator* (const Vector2 &v)
 Matrix Vector multiplication.
Matrix2 operator* (double v)
 Scalar matrix multiplication.
Matrix2operator*= (double v)
 Scalar matrix multiplication and output into itself.
Matrix2operator+= (const Matrix2 &m)
 Matrix Addition and output into itself.
Matrix2operator+= (double v)
 Add scalar to every matrix element and output into itself.
Matrix2operator= (const Matrix2 &m)
 Copy Matrix values from new matrix.
Matrix2operator= (double v)
 Set all Matrix Elements to scalar value.
Vector2operator[] (int idx)
 Row Element Access.
Vector2 operator[] (int idx) const
 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:
m2x2 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:
rrow index
ccolumn index
Returns:
element value

Definition at line 288 of file matrix3.h.

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

Matrix Multiplication.

Parameters:
mMatrix to be multiplied with
Returns:
Result Matrix

Definition at line 316 of file matrix3.h.

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

Matrix Vector multiplication.

Parameters:
vVector to be multiplied with
Returns:
Result Vector

Definition at line 327 of file matrix3.h.

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

Scalar matrix multiplication.

Parameters:
vScalar value to be multiplied with
Returns:
Result Matrix

Definition at line 337 of file matrix3.h.

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

Scalar matrix multiplication and output into itself.

Parameters:
vScalar value to be multiplied with
Returns:
Result Matrix

Definition at line 356 of file matrix3.h.

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

Matrix Addition and output into itself.

Parameters:
mMatrix to be added
Returns:
Result Matrix

Definition at line 365 of file matrix3.h.

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

Add scalar to every matrix element and output into itself.

Parameters:
vScalar value to be added
Returns:
Result Matrix

Definition at line 374 of file matrix3.h.

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

Copy Matrix values from new matrix.

Parameters:
m2x2 Matrix

Definition at line 255 of file matrix3.h.

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

Set all Matrix Elements to scalar value.

Parameters:
vScalar value to be set to
Returns:
Result Matrix

Definition at line 347 of file matrix3.h.

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

Row Element Access.

Parameters:
idxrow index
Returns:
row as two dimensional vector

Definition at line 271 of file matrix3.h.

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

Row Element Access.

Parameters:
idxrow index
Returns:
row as two dimensional vector

Definition at line 279 of file matrix3.h.


Friends And Related Function Documentation

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

Print out matrix.

Parameters:
osoutput stream
mMatrix 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 Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


active_realtime_segmentation
Author(s): Mårten Björkman. Maintained by Jeannette Bohg
autogenerated on Wed Jan 23 2013 15:46:44