#include <matrix2x2.h>
Public Members | |||
![]() | ![]() | matrix2x2 (void) | |
![]() | ![]() | matrix2x2 ( const double k ) | |
![]() | ![]() | matrix2x2 ( const vector2 &r0, const vector2 &r1 ) | |
![]() | ![]() | matrix2x2 ( const double m00, const double m01, const double m10, const double m11 ) | |
![]() | ![]() | matrix2x2 ( const matrix2x2 &m ) | |
![]() | ![]() | vector2& | operator[] ( const unsigned i ) |
![]() | ![]() | Get one row of the matrix. More... | |
![]() | ![]() | const vector2& | operator[] ( const unsigned i ) const |
![]() | ![]() | Get one row of the matrix. More... | |
![]() | ![]() | vector2 | row0 |
![]() | ![]() | The top row of the matrix. | |
![]() | ![]() | vector2 | row1 |
![]() | ![]() | The bottom row of the matrix. | |
Static Public Members | |||
![]() | ![]() | vector2 | solve ( const matrix2x2 &M, const vector2 &y ) |
![]() | ![]() | Solve a pair of simultaneous linear equations. More... | |
Using this class for a 2x2 matrix is more efficient and safer than using a generic vector<vector<double>>.
Definition at line 43 of file matrix2x2.h.
matrix2x2::matrix2x2 (void) [inline]
|
Definition at line 229 of file matrix2x2.h.
matrix2x2::matrix2x2 (const double k) [inline]
|
Definition at line 234 of file matrix2x2.h.
matrix2x2::matrix2x2 (const vector2 & r0, const vector2 & r1) [inline]
|
Definition at line 257 of file matrix2x2.h.
matrix2x2::matrix2x2 (const double m00, const double m01, const double m10, const double m11) [inline]
|
Definition at line 244 of file matrix2x2.h.
matrix2x2::matrix2x2 (const matrix2x2 & m) [inline]
|
Definition at line 268 of file matrix2x2.h.
vector2 & matrix2x2::operator[] (const unsigned i) [inline]
|
Get one row of the matrix.
| i | which row to get; 0 indicates the top row, 1 the bottom row |
assert( i == 0 || i== 1 );
Definition at line 277 of file matrix2x2.h.
const vector2 & matrix2x2::operator[] (const unsigned i) const [inline]
|
Get one row of the matrix.
| i | which row to get 0 indicates the top row, 1 the bottom row; |
assert( i == 0 || i== 1 );
Definition at line 288 of file matrix2x2.h.
vector2 matrix2x2::solve (const matrix2x2 & M, const vector2 & y) [static]
|
Solve a pair of simultaneous linear equations.
The equations are represented by the matrix equation M*x==y.
| M | the matrix holding the equation coefficients |
| y | the vector holding the equation right-hand-sides |
x, such that (M*x)==y; Definition at line 46 of file matrix2x2.cpp.
| vector2 matrix2x2::row0 |
| vector2 matrix2x2::row1 |
1.0.0 written by Dimitri van Heesch,
© 1997-1999