QwAnalysis
|
#include "matrix.h"
Go to the source code of this file.
Macros | |
#define | DBL_EPSILON 2.22045e-16 |
Functions | |
double * | V_Zero (double *v, const int n) |
double * | V_Unit (double *v, const int n, const int k) |
void | V_Print (const double *v, const int n) |
void | V_Print (const double *v, const double *w, const int n) |
double | UNorm (const double *A, int n, const int m) |
Calculates the least upper bound norm. More... | |
double * | M_Cholesky (double *B, double *q, const int n) |
Calculates the Cholesky decomposition of the positive-definite matrix B. More... | |
void | RowMult (const double a, double *A, const double b, const double *B, const int n) |
Calculates a*A + b*B, where both A and B are rows of length n, returns as A. More... | |
void | M_Print (const double *A, const int n) |
Print matrix A of dimension [n,n] to cout. More... | |
void | M_Print (const double *A, const double *B, const int n) |
Print matrices A and B of dimension [n,n] to cout. More... | |
double * | M_Unit (double *A, const int n) |
Creates unit matrix A. More... | |
double * | M_Zero (double *A, const int n) |
Creates zero matrix A. More... | |
double * | M_Invert (double *Ap, double *Bp, const int n) |
Matrix inversion of Ap will be stored in Bp. More... | |
double * | M_InvertPos (double *B, const int n) |
Calculates a*A + b*B, where both A and B are rows of length n. More... | |
double * | M_A_times_b (double *y, const double *A, const int n, const int m, const double *b) |
Calculates y[n] = A[n,m] * b[m], with dimensions indicated. More... | |
#define DBL_EPSILON 2.22045e-16 |
Definition at line 3 of file matrix.cc.
Referenced by M_Cholesky().
double* M_A_times_b | ( | double * | y, |
const double * | A, | ||
const int | n, | ||
const int | m, | ||
const double * | b | ||
) |
Calculates y[n] = A[n,m] * b[m], with dimensions indicated.
Definition at line 443 of file matrix.cc.
References Qw::m.
Referenced by QwTrackingTreeCombine::r2_PartialTrackFit().
double* M_Cholesky | ( | double * | B, |
double * | q, | ||
const int | n | ||
) |
Calculates the Cholesky decomposition of the positive-definite matrix B.
Definition at line 76 of file matrix.cc.
References DBL_EPSILON, Qw::min, and UNorm().
Referenced by M_InvertPos().
double* M_Invert | ( | double * | Ap, |
double * | Bp, | ||
const int | n | ||
) |
Matrix inversion of Ap will be stored in Bp.
Definition at line 240 of file matrix.cc.
References M_Unit(), and RowMult().
Referenced by QwTrackingTreeCombine::r2_PartialTrackFit().
double* M_InvertPos | ( | double * | B, |
const int | n | ||
) |
Calculates a*A + b*B, where both A and B are rows of length n.
Definition at line 376 of file matrix.cc.
References M_Cholesky().
void M_Print | ( | const double * | A, |
const int | n | ||
) |
Print matrix A of dimension [n,n] to cout.
void M_Print | ( | const double * | A, |
const double * | B, | ||
const int | n | ||
) |
double* M_Unit | ( | double * | A, |
const int | n | ||
) |
Creates unit matrix A.
Definition at line 199 of file matrix.cc.
Referenced by M_Invert().
double* M_Zero | ( | double * | A, |
const int | n | ||
) |
void RowMult | ( | const double | a, |
double * | A, | ||
const double | b, | ||
const double * | B, | ||
const int | n | ||
) |
Calculates a*A + b*B, where both A and B are rows of length n, returns as A.
Definition at line 130 of file matrix.cc.
Referenced by M_Invert().
double UNorm | ( | const double * | A, |
int | n, | ||
const int | m | ||
) |
Calculates the least upper bound norm.
Definition at line 51 of file matrix.cc.
References Qw::m.
Referenced by M_Cholesky().
void V_Print | ( | const double * | v, |
const int | n | ||
) |
void V_Print | ( | const double * | v, |
const double * | w, | ||
const int | n | ||
) |
double* V_Unit | ( | double * | v, |
const int | n, | ||
const int | k | ||
) |