CellGPU
0.8.0
GPU-accelerated simulations of cells
|
contains a {{x11,x12},{x21,x22}} set, and matrix manipulations More...
#include <Matrix.h>
Public Member Functions | |
HOSTDEVICE | Matrix2x2 () |
Default constructor is the identity matrix. | |
HOSTDEVICE | Matrix2x2 (Dscalar y11, Dscalar y12, Dscalar y21, Dscalar y22) |
Generic constructor is whatever you wnat it to be. | |
HOSTDEVICE void | set (Dscalar y11, Dscalar y12, Dscalar y21, Dscalar y22) |
Set the values to some desired set. | |
HOSTDEVICE void | transpose () |
Transpose. | |
HOSTDEVICE void | operator= (const Matrix2x2 &m2) |
assignment operator | |
HOSTDEVICE void | operator*= (const Matrix2x2 &m2) |
matrix multiplication operator | |
HOSTDEVICE void | operator*= (Dscalar a) |
scalar multiplication operator | |
HOSTDEVICE void | operator+= (const Matrix2x2 &m2) |
Matrix addition operator. | |
HOSTDEVICE void | operator-= (const Matrix2x2 &m2) |
Matrix subtraction operator. | |
Public Attributes | |
Dscalar | x11 |
The entries of the matrix. | |
Dscalar | x12 |
Dscalar | x21 |
Dscalar | x22 |
Friends | |
HOSTDEVICE friend Matrix2x2 | operator* (const Matrix2x2 &m1, const Matrix2x2 &m2) |
matrix multiplication operator | |
HOSTDEVICE friend Matrix2x2 | operator* (const Matrix2x2 &m, const Dscalar a) |
scalar right multiplication operator | |
HOSTDEVICE friend Matrix2x2 | operator* (const Dscalar a, const Matrix2x2 &m) |
scalar left multiplication operator | |
HOSTDEVICE friend Matrix2x2 | operator+ (const Matrix2x2 &m1, const Matrix2x2 &m2) |
Matrix addition operator. | |
HOSTDEVICE friend Matrix2x2 | operator- (const Matrix2x2 &m1, const Matrix2x2 &m2) |
matrix subtraction operator | |
HOSTDEVICE friend Dscalar2 | operator* (const Dscalar2 &v, const Matrix2x2 &m) |
matrix-vector multiplication operator | |
HOSTDEVICE friend Dscalar2 | operator* (const Matrix2x2 &m, const Dscalar2 &v) |
matrix-vector multiplication operator | |
contains a {{x11,x12},{x21,x22}} set, and matrix manipulations
Matrix2x2 provides a simple interface for operations using 2x2 matrices. In particular, it implement matrix-maxtrix multiplication, and has specialized matrix-vector and vector-matrix multiplication in which Dscalar2 variables take the place of vectors. A dyadic product is implemented which takes two Dscalar2s and returns a Matrix2x2