libStatGen Software 1
|
Public Member Functions | |
Matrix (Matrix &m) | |
Matrix (Matrix &m, const char *name) | |
Matrix (int n, int m) | |
Matrix (const char *name) | |
Matrix (const char *name, int n, int m) | |
void | Dimension (int m, int n) |
void | Dimension (int m, int n, double value) |
void | GrowTo (int m, int n) |
void | GrowTo (int m, int n, double value) |
void | SetLabel (const char *name) |
void | SetColumnLabel (int n, const char *name) |
const char * | GetColumnLabel (int n) |
void | SetColWidth (int n, int w) |
void | SetColPrecision (int n, int p) |
void | CopyLabels (Matrix &m) |
void | Negate () |
void | Identity () |
void | Zero () |
void | Set (double k) |
void | Copy (const Matrix &m) |
void | Transpose (const Matrix &m) |
void | Add (const Matrix &m) |
void | AddMultiple (double k, const Matrix &m) |
void | Product (const Matrix &left, const Matrix &right) |
void | Add (double k) |
void | Multiply (double k) |
void | Reduce (double tol=0.0) |
Vector & | operator[] (int i) |
const Vector & | operator[] (int i) const |
void | DeleteRow (int r) |
void | DeleteColumn (int c) |
void | SwapRows (int r1, int r2) |
void | SwapColumns (int c1, int c2) |
void | MultiplyRow (int r1, double k) |
void | AddRows (int r1, int r2) |
void | AddRows (double k, int r1, int r2) |
void | Sort () |
void | Print (FILE *f, int maxRows=-1, int maxCols=-1) |
void | PrintUpper (FILE *f, int maxRows=-1, int maxCols=-1, bool print_diag=false) |
void | PrintLower (FILE *f, int maxRows=-1, int maxCols=-1, bool print_diag=false) |
void | SetupPrint (FILE *f, int r, int c, int &column_zero, int *precision, int *width) |
void | Read (FILE *f) |
Matrix & | operator= (const Matrix &rhs) |
bool | operator== (const Matrix &rhs) const |
bool | operator!= (const Matrix &rhs) const |
Matrix & | operator*= (double rhs) |
Matrix & | operator/= (double rhs) |
void | StackBottom (const Matrix &m) |
void | StackLeft (const Matrix &m) |
void | Swap (Matrix &m) |
double | Min () const |
double | Max () const |
double | Mean () const |
double | SafeMin () const |
double | SafeMax () const |
double | SafeMean () const |
int | SafeCount () const |
Vector & | Last () |
Public Attributes | |
String | label |
ColumnExtras * | extras |
int | rows |
int | cols |
int | size |
int | extraSize |
Vector ** | data |
Definition at line 76 of file MathMatrix.h.
|
inline |
Definition at line 84 of file MathMatrix.h.
|
inline |
Definition at line 88 of file MathMatrix.h.
|
inline |
Definition at line 93 of file MathMatrix.h.
|
inline |
Definition at line 99 of file MathMatrix.h.
|
inline |
Definition at line 104 of file MathMatrix.h.
|
inline |
Definition at line 109 of file MathMatrix.h.
Matrix::~Matrix | ( | ) |
Definition at line 30 of file MathMatrix.cpp.
void Matrix::Add | ( | const Matrix & | m | ) |
Definition at line 195 of file MathMatrix.cpp.
void Matrix::Add | ( | double | k | ) |
Definition at line 181 of file MathMatrix.cpp.
void Matrix::AddMultiple | ( | double | k, |
const Matrix & | m | ||
) |
Definition at line 208 of file MathMatrix.cpp.
void Matrix::AddRows | ( | double | k, |
int | r1, | ||
int | r2 | ||
) |
Definition at line 239 of file MathMatrix.cpp.
void Matrix::AddRows | ( | int | r1, |
int | r2 | ||
) |
Definition at line 252 of file MathMatrix.cpp.
void Matrix::Copy | ( | const Matrix & | m | ) |
Definition at line 162 of file MathMatrix.cpp.
void Matrix::CopyLabels | ( | Matrix & | m | ) |
Definition at line 407 of file MathMatrix.cpp.
void Matrix::DeleteColumn | ( | int | c | ) |
Definition at line 314 of file MathMatrix.cpp.
void Matrix::DeleteRow | ( | int | r | ) |
Definition at line 303 of file MathMatrix.cpp.
void Matrix::Dimension | ( | int | m, |
int | n | ||
) |
Definition at line 59 of file MathMatrix.cpp.
void Matrix::Dimension | ( | int | m, |
int | n, | ||
double | value | ||
) |
Definition at line 111 of file MathMatrix.cpp.
|
inline |
Definition at line 133 of file MathMatrix.h.
|
inline |
Definition at line 119 of file MathMatrix.h.
|
inline |
Definition at line 123 of file MathMatrix.h.
void Matrix::Identity | ( | ) |
Definition at line 135 of file MathMatrix.cpp.
|
inline |
Definition at line 247 of file MathMatrix.h.
double Matrix::Max | ( | ) | const |
Definition at line 555 of file MathMatrix.cpp.
double Matrix::Mean | ( | ) | const |
Definition at line 568 of file MathMatrix.cpp.
double Matrix::Min | ( | ) | const |
Definition at line 542 of file MathMatrix.cpp.
void Matrix::Multiply | ( | double | k | ) |
Definition at line 188 of file MathMatrix.cpp.
void Matrix::MultiplyRow | ( | int | r1, |
double | k | ||
) |
Definition at line 247 of file MathMatrix.cpp.
void Matrix::Negate | ( | ) |
Definition at line 155 of file MathMatrix.cpp.
|
inline |
Definition at line 210 of file MathMatrix.h.
|
inline |
Definition at line 215 of file MathMatrix.h.
|
inline |
Definition at line 220 of file MathMatrix.h.
Definition at line 203 of file MathMatrix.h.
bool Matrix::operator== | ( | const Matrix & | rhs | ) | const |
Definition at line 481 of file MathMatrix.cpp.
|
inline |
Definition at line 165 of file MathMatrix.h.
|
inline |
Definition at line 171 of file MathMatrix.h.
void Matrix::Print | ( | FILE * | f, |
int | maxRows = -1 , |
||
int | maxCols = -1 |
||
) |
Definition at line 370 of file MathMatrix.cpp.
void Matrix::PrintLower | ( | FILE * | f, |
int | maxRows = -1 , |
||
int | maxCols = -1 , |
||
bool | print_diag = false |
||
) |
Definition at line 683 of file MathMatrix.cpp.
void Matrix::PrintUpper | ( | FILE * | f, |
int | maxRows = -1 , |
||
int | maxCols = -1 , |
||
bool | print_diag = false |
||
) |
Definition at line 657 of file MathMatrix.cpp.
Definition at line 222 of file MathMatrix.cpp.
void Matrix::Read | ( | FILE * | f | ) |
Definition at line 339 of file MathMatrix.cpp.
void Matrix::Reduce | ( | double | tol = 0.0 | ) |
Definition at line 257 of file MathMatrix.cpp.
int Matrix::SafeCount | ( | ) | const |
Definition at line 647 of file MathMatrix.cpp.
double Matrix::SafeMax | ( | ) | const |
Definition at line 606 of file MathMatrix.cpp.
double Matrix::SafeMean | ( | ) | const |
Definition at line 631 of file MathMatrix.cpp.
double Matrix::SafeMin | ( | ) | const |
Definition at line 581 of file MathMatrix.cpp.
void Matrix::Set | ( | double | k | ) |
Definition at line 148 of file MathMatrix.cpp.
|
inline |
Definition at line 141 of file MathMatrix.h.
|
inline |
Definition at line 129 of file MathMatrix.h.
|
inline |
Definition at line 137 of file MathMatrix.h.
void Matrix::SetLabel | ( | const char * | name | ) |
Definition at line 52 of file MathMatrix.cpp.
void Matrix::SetupPrint | ( | FILE * | f, |
int | r, | ||
int | c, | ||
int & | column_zero, | ||
int * | precision, | ||
int * | width | ||
) |
Definition at line 726 of file MathMatrix.cpp.
void Matrix::Sort | ( | ) |
Definition at line 476 of file MathMatrix.cpp.
void Matrix::StackBottom | ( | const Matrix & | m | ) |
Definition at line 491 of file MathMatrix.cpp.
void Matrix::StackLeft | ( | const Matrix & | m | ) |
Definition at line 504 of file MathMatrix.cpp.
void Matrix::Swap | ( | Matrix & | m | ) |
Definition at line 515 of file MathMatrix.cpp.
void Matrix::SwapColumns | ( | int | c1, |
int | c2 | ||
) |
Definition at line 325 of file MathMatrix.cpp.
|
inline |
Definition at line 180 of file MathMatrix.h.
void Matrix::Transpose | ( | const Matrix & | m | ) |
Definition at line 172 of file MathMatrix.cpp.
void Matrix::Zero | ( | ) |
Definition at line 128 of file MathMatrix.cpp.
int Matrix::cols |
Definition at line 81 of file MathMatrix.h.
Vector** Matrix::data |
Definition at line 82 of file MathMatrix.h.
ColumnExtras* Matrix::extras |
Definition at line 80 of file MathMatrix.h.
int Matrix::extraSize |
Definition at line 81 of file MathMatrix.h.
String Matrix::label |
Definition at line 79 of file MathMatrix.h.
int Matrix::rows |
Definition at line 81 of file MathMatrix.h.
int Matrix::size |
Definition at line 81 of file MathMatrix.h.