My Project
|
Classes | |
class | Loader |
Inspired from Eigen Lib. More... | |
Public Member Functions | |
mat (const mat &m) | |
mat (const int col, const int row) | |
mat (vector< vector< float > > v2) | |
mat (const int col, const int row, vector< float > v) | |
Loader | operator<< (float x) |
vector< vector< float > > | toVecVec () |
vec | getVec (int n) |
row | getRow (int n) |
Get an index row from a matrix. | |
vec | operator* (vec &v) |
mat | operator* (mat m) |
mat | operator= (const mat &m) |
bool | operator== (const mat &m) |
mat | operator+ (mat m) |
mat | operator- (const mat &m) |
mat | operator/ (float f) |
mat | operator* (float f) |
mat | removeRow (int index) |
mat | removeVec (int index) |
Get an index Column or Vector from a matrix. | |
mat | insertVecNext (int index, vec v) |
Add vector to the right of index, Should I change the name to insertVecRight() | |
mat | insertVecPrevious (int index, vec v) |
mat | clone () |
mat | concat (mat m) |
mat | rowMultiScala (int index, float f) |
mat | vecMultiScala (int index, float f) |
mat | swapRow (int inx1, int inx2) |
Add test cases. | |
void | geneMat (int init) |
Generate matrix from init to ncol*nrow. | |
void | geneMatRandom (int fst, int snd) |
Generate a random matrix in interval @fst and @snd [fst, snd) | |
void | print () |
print the matrix | |
string | toStr () |
void | print2 () |
void | zero () |
void | identity () |
bool | isId () |
bool | isZero () |
float | det () |
mat | id () |
mat | subMatrix (int colIndex, int rowIndex) |
/Library/WebServer/Documents/zsurface/pdf/submatrix_get.pdf 1 2 3 subMatrix(1, 0) => 4 5 6 4 5 6 | |
mat | transpose () |
tranpose matrix | |
mat | block (int colIndex, int clen, int rowIndex, int rlen) |
subblock of a matrix | |
mat | take (int len) |
Take first n columns from a matrix. | |
mat | drop (int len) |
Drop first n columns from a matrix. | |
mat | init () |
Drop the last column from a matrix. | |
mat | tail () |
Drop the first column from a matrix. | |
mat (const mat &m) | |
mat (const int col, const int row) | |
mat (vector< vector< float > > v2) | |
mat (const int col, const int row, vector< float > v) | |
Loader | operator<< (float x) |
vec | getVec (int n) |
row | getRow (int n) |
vec | operator* (vec &v) |
mat | operator* (mat &m) |
mat | operator= (const mat &m) |
bool | operator== (const mat &m) |
mat | operator+ (mat m) |
mat | operator- (const mat &m) |
mat | operator/ (float f) |
mat | operator* (float f) |
mat | removeRow (int index) |
mat | removeVec (int index) |
mat | insertVecNext (int index, vec v) |
mat | insertVecPrevious (int index, vec v) |
mat | clone () |
mat | concat (mat m) |
mat | rowMultiScala (int index, float f) |
mat | vecMultiScala (int index, float f) |
mat | swapRow (int inx1, int inx2) |
void | geneMat (int init) |
void | geneMatRandom (int fst, int snd) |
void | print () |
string | toStr () |
void | print2 () |
void | zero () |
void | identity () |
bool | isId () |
bool | isZero () |
float | det () |
mat | id () |
mat | subMatrix (int colIndex, int rowIndex) |
/Library/WebServer/Documents/zsurface/pdf/submatrix_get.pdf 1 2 3 subMatrix(1, 0) => 4 5 6 4 5 6 | |
mat | transpose () |
mat | block (int colIndex, int clen, int rowIndex, int rlen) |
mat | take (int len) |
mat | drop (int len) |
mat | init () |
mat | tail () |
Public Attributes | |
int | ncol |
int | nrow |
float ** | arr |
mat MatrixVector::mat::block | ( | int | cIndex, |
int | clen, | ||
int | rIndex, | ||
int | rlen | ||
) |
subblock of a matrix
mat MatrixVector::mat::drop | ( | int | len | ) |
void MatrixVector::mat::geneMat | ( | int | init | ) |
Generate matrix from init to ncol*nrow.
void MatrixVector::mat::geneMatRandom | ( | int | fst, |
int | snd | ||
) |
Generate a random matrix in interval @fst and @snd [fst, snd)
@fst @snd
@fst @snd
vec MatrixVector::mat::getVec | ( | int | n | ) |
get 0 <= n <= nrow vector or column from matrix
mat MatrixVector::mat::init | ( | ) |
Drop the last column from a matrix.
\[ \begin{bmatrix} a & b & c \\ c & d & e \\ f & g & h \end{bmatrix} \rightarrow \begin{bmatrix} a & b \\ c & d \\ f & g \end{bmatrix} \]
\[ \begin{bmatrix} a & b & c \\ c & d & e \\ f & g & h \end{bmatrix} \rightarrow \begin{bmatrix} a & b \\ c & d \\ f & g \end{bmatrix} \]
void MatrixVector::mat::print | ( | ) |
print the matrix
mat MatrixVector::mat::subMatrix | ( | int | cStart, |
int | rStart | ||
) |
/Library/WebServer/Documents/zsurface/pdf/submatrix_get.pdf 1 2 3 subMatrix(1, 0) => 4 5 6 4 5 6
subblock matrix, submatrix 1 2 3 3 4 5 block(1, 1)=> 4 5 6 7 8 7 8
mat MatrixVector::mat::tail | ( | ) |
Drop the first column from a matrix.
\[ \begin{bmatrix} a & b & c \\ c & d & e \\ f & g & h \end{bmatrix} \rightarrow \begin{bmatrix} b & c \\ d & e \\ h & h \end{bmatrix} \]
\[ \begin{bmatrix} a & b & c \\ c & d & e \\ f & g & h \end{bmatrix} \rightarrow \begin{bmatrix} b & c \\ d & e \\ h & h \end{bmatrix} \]
mat MatrixVector::mat::take | ( | int | len | ) |
mat MatrixVector::mat::transpose | ( | ) |
tranpose matrix
1 2 3 => 1 4 4 5 6 2 5 3 6
mat MatrixVector::mat::transpose | ( | ) |
1 2 3 => 1 4 4 5 6 2 5 3 6