Matrix Class Reference
#include <Matrix.h>
List of all members.
Public Member Functions |
| | Matrix () |
| | Matrix Constructor.
|
| | ~Matrix (void) |
| | Matrix Destructor.
|
| bool | operator== (Matrix &) |
| void | printTheMat (ostream &) |
| void | printTheMat_MaplePCAFrmt (ostream &, const string &) |
| void | printTheMat_MapleTransposedPCAFrmt (ostream &, const string &) |
| vector< int > | getConsDist (void) |
| | returns the result of private functions calcConsDist(is this nessicary?)
|
| void | printConsDist (ostream &) |
| void | transpose (void) |
| int | size (void) |
| | returns the size of the matrix
|
| void | printTheMat (int, ostream &) |
| void | printMat (vector< vector< string > >, ostream &) |
| bool | findCycles (int &, int &) |
| Matrix | getSubMat (const int &, const int &) |
| vector< int > | getAvgVec (void) |
| vector< double > | getStdVec (void) |
| void | printAvgVec (ostream &) |
| void | printStdVec (ostream &) |
| void | printStats (ostream &) |
| void | printStats_GnuPlot (ostream &) |
| map< string, vector< int > > | groupMat (void) |
| int | rowSize (void) |
| int | colSize (void) |
| void | addRow (const vector< int > &row) |
| void | addRow_String (const string &, char *) |
| vector< int > | getRow (const int &) |
| vector< int > | getCol (const int &) |
| vector< int > | getCol (const string &) |
| bool | isEmpty (void) |
| | returns true if the matrix is empty
|
| void | clear (void) |
| | empties the Matrix
|
| void | printCycles (ostream &, const int &, const int &) |
| void | readMat (ifstream &) |
| void | readMat2 (ifstream &) |
| void | readLabels (ifstream &) |
| vector< string > | getLabels (void) |
| | returns labels
|
Private Member Functions |
| vector< int > | calcDistVec (vector< vector< string > >, vector< vector< string > >) |
| vector< int > | calcConsDist (void) |
| vector< int > | calcAvgVec (void) |
| vector< double > | calcStdVec (void) |
Private Attributes |
| vector< vector< int > > | theMatrix |
| vector< string > | labels |
Detailed Description
The Matrix is used by various parts of the simulation for more complex mathematical analysis
Constructor & Destructor Documentation
| Matrix::Matrix |
( |
|
) |
[inline] |
| Matrix::~Matrix |
( |
void |
|
) |
[inline] |
Member Function Documentation
| void Matrix::addRow |
( |
const vector< int > & |
row |
) |
|
| void Matrix::addRow_String |
( |
const string & |
row, |
|
|
char * |
delim | |
|
) |
| | |
Add row as a string which is then parsed into columns
| vector< int > Matrix::calcAvgVec |
( |
void |
|
) |
[private] |
calculates the average vector
| vector< int > Matrix::calcConsDist |
( |
void |
|
) |
[private] |
Calculates the hamming distance for this matrix
| vector<int> Matrix::calcDistVec |
( |
vector< vector< string > > |
, |
|
|
vector< vector< string > > |
| |
|
) |
| | [private] |
| vector< double > Matrix::calcStdVec |
( |
void |
|
) |
[private] |
Calculates the standard vector
| void Matrix::clear |
( |
void |
|
) |
[inline] |
| int Matrix::colSize |
( |
void |
|
) |
|
returns the number of columns
| bool Matrix::findCycles |
( |
int & |
start, |
|
|
int & |
end | |
|
) |
| | |
| vector< int > Matrix::getAvgVec |
( |
void |
|
) |
|
returns the result of CalcAvgVec
| vector< int > Matrix::getCol |
( |
const string & |
colName |
) |
|
retrieves a a column from teh matrix by name
| vector< int > Matrix::getCol |
( |
const int & |
colIndex |
) |
|
retrieves a column from the matrix
| vector<int> Matrix::getConsDist |
( |
void |
|
) |
[inline] |
returns the result of private functions calcConsDist(is this nessicary?)
| vector<string> Matrix::getLabels |
( |
void |
|
) |
[inline] |
| vector< int > Matrix::getRow |
( |
const int & |
rowIndex |
) |
|
returns a row from the matrix
| vector< double > Matrix::getStdVec |
( |
void |
|
) |
|
returns the result of calcStdVec
| Matrix Matrix::getSubMat |
( |
const int & |
startRow, |
|
|
const int & |
endRow | |
|
) |
| | |
returns the submatrix of M[startRow, endRow]
| map< string, vector< int > > Matrix::groupMat |
( |
void |
|
) |
|
| bool Matrix::isEmpty |
( |
void |
|
) |
[inline] |
returns true if the matrix is empty
| bool Matrix::operator== |
( |
Matrix & |
right |
) |
|
| void Matrix::printAvgVec |
( |
ostream & |
out |
) |
|
Prints the results of calcAvgVec to ostream out
| void Matrix::printConsDist |
( |
ostream & |
out |
) |
|
prints the calcConsDist to ostream out
| void Matrix::printCycles |
( |
ostream & |
out, |
|
|
const int & |
cycleStart, |
|
|
const int & |
cycleEnd | |
|
) |
| | |
prints the cycles to ostream out
| void Matrix::printMat |
( |
vector< vector< string > > |
v, |
|
|
ostream & |
out | |
|
) |
| | |
prints vector v formated as a matrix
| void Matrix::printStats |
( |
ostream & |
out |
) |
|
Prints the average and std for each col to ostream out
| void Matrix::printStats_GnuPlot |
( |
ostream & |
out |
) |
|
| void Matrix::printStdVec |
( |
ostream & |
out |
) |
|
Prints the results of calcStdVec to ostream out
| void Matrix::printTheMat |
( |
int |
row, |
|
|
ostream & |
out | |
|
) |
| | |
prints a single row of the matrix
| void Matrix::printTheMat |
( |
ostream & |
out |
) |
|
prints the matrix to ostream out
| void Matrix::printTheMat_MaplePCAFrmt |
( |
ostream & |
out, |
|
|
const string & |
runName | |
|
) |
| | |
prints the matrix in a format readable by maple
| void Matrix::printTheMat_MapleTransposedPCAFrmt |
( |
ostream & |
out, |
|
|
const string & |
runName | |
|
) |
| | |
prints the transposed matrix in a format readable by maple
| void Matrix::readLabels |
( |
ifstream & |
in |
) |
|
Reads column labels from a text file the labels are assumed to be one per line
| void Matrix::readMat |
( |
ifstream & |
in |
) |
|
reads a matrix in from a filestream
| void Matrix::readMat2 |
( |
ifstream & |
in |
) |
|
a different way of reading a matrix in from a file
| int Matrix::rowSize |
( |
void |
|
) |
|
returns the number of rows
| int Matrix::size |
( |
void |
|
) |
[inline] |
returns the size of the matrix
| void Matrix::transpose |
( |
void |
|
) |
|
Member Data Documentation
The documentation for this class was generated from the following files: