Robotcode
1.0
|
class that implements mathematical operations for a 2x2 matrix More...
#include <Matrix2d.h>
Public Member Functions | |
Matrix2D (double=0, double=0, double=0, double=0) | |
Create empty matrix. | |
Matrix2D | operator+ (const Matrix2D &) const |
Addition. | |
Matrix2D | operator- (const Matrix2D &) const |
Subtraction. | |
Matrix2D | operator* (const double s) const |
Multiplication with scalar. | |
Matrix2D | operator* (const Matrix2D &) const |
Matrix Multiplication. | |
Matrix2D | operator/ (const double s) const |
Devision by scalar. | |
Matrix2D & | operator= (const Matrix2D &) |
assignment operator (memberwise copy) | |
double * | operator[] (const int i) |
retrive a row or element | |
Vector2D | operator* (Vector2D &src) const |
Matrix * vector multiplication. | |
Matrix2D | getInverse () const |
Inverse. | |
Matrix2D | getTranspose () |
Transpose. | |
Public Attributes | |
double | x [2][2] |
The four data members. | |
Friends | |
ostream & | operator<< (ostream &, const Matrix2D &) |
Tab-delimited output. | |
istream & | operator>> (istream &, Matrix2D &) |
Input from File. |
class that implements mathematical operations for a 2x2 matrix
Most necessary mathematical operations are defined over operator overloading. Furthermore, there is a stream input and output operator.