// -*- C++ -*-
// automatically generated by autodoc

// ========== HEADER FILE src/matrix/cholesky.h: ==========

ulong cholesky(MAT &A, Type *v=0);
// Replaces the symmetric matrix A by its left (lower)
// cholesky factor L (incl. diagonal).
// The inverses of the diagonal elements are put into v[]
// A = L^T * L

void cholesky_solve(const MAT &L, const Type *v, const Type *b, Type *x);
// Solves A * x = b;
// with L the left (lower) cholesky factor of A

void cholesky_invert(const MAT &L, const Type *v, MAT &A);
// Compute (L * L^T)-1

ulong cholesky_pseudo_inverse(const MAT &X, MAT &J);
// Compute the pseudo-inverse J of X
// J * X == 1 == X * J  for invertible X

// ========== HEADER FILE src/matrix/matrix.h: ==========

class matrix : public array2d<Type>;
// Simple minded matrix class

// ========== HEADER FILE src/matrix/matrixsymmetryq.h: ==========

bool is_toeplitz(const MAT &A, const Type eps=1e-8);
// Return whether A is a Toeplitz matrix

bool is_circulant(const MAT &A, const Type eps=1e-8);
// Return whether A is a symmetric Toeplitz matrix

bool is_symmetric(const MAT &A, const Type eps=1e-8);
// Return whether A is symmetric

bool is_anti_symmetric(const MAT &A, const Type eps=1e-8);
// Return whether A is anti symmetric

bool is_minor_symmetric(const MAT &A, const Type eps=1e-8);
// Return whether A is symmetric wrt. minor diagonal

bool is_minor_anti_symmetric(const MAT &A, const Type eps=1e-8);
// Return whether A is antisymmetric wrt. minor diagonal

bool is_doubly_symmetric(const MAT &A, const Type eps=1e-8);
// Return whether A is symmetric wrt. to both major and minor diagonal
// i.e. looks like this:
//  0       1       2       3
//  1       5       6       2
//  2       6       5       1
//  3       2       1       0

// ========== HEADER FILE src/matrix/mmult.h: ==========

void mmult(const MAT &a1, const MAT &a2, MAT &z);
// z = a1 * a2
// Result undefined if z is identical to either a1 or a2

void mmulttr2(const MAT &a1, const MAT &a2, MAT &z);
// z = a1 * a2^T
// Result undefined if z is identical to either a1 or a2

void mmulttr1(const MAT &a1, const MAT &a2, MAT &z);
// z = a1^T * a2
// Result undefined if z is identical to either a1 or a2

void mmultby(MAT &a, const MAT &b);
// a *= b

void mmultbytr2(MAT &a, const MAT &b);
// a = a * b^T

void mmultbytr1(MAT &a, const MAT &b);
// a = a^T * b

void msqr(MAT &a);
//  a *= a

void msqr(const MAT &a, MAT &b);
//  b = a * a

void mvmult(const MAT &A, const Type *x, Type *b);
// b = A * x

void mvmulttr(const MAT &A, const Type *x, Type *b);
// b = A^T * x

// ========== HEADER FILE src/matrix/reorth.h: ==========

double orth_q(const MAT &m);
// Return quantity that reflects how much the matrix m
// deviates from being orthogonal.

double reorth_step(MAT &a, MAT *t=0);
// Multiply matrix a by (1+(1-A^T A)/2)
// making a closer to orthogonal its nearest orthogonal E
//
// If T is supplied it is used as temporary and
// the factor (1+(1-A^T A)/2) is stored upon return.
// Accumulate P = \prod{T_k} then E = A P
// and the polar decomposition of A  (A=W H)
// can be obtained as W=E,  H=W^T A

// ========== HEADER FILE src/matrix/symmetricpart.h: ==========

int make_symmetric(MAT &A);
// Discard anti-symmetric part of A

int symmetric_part(const MAT &A, MAT &B);
// B = symmetric part of A

int make_anti_symmetric(MAT &A);
// Discard symmetric part of A

int anti_symmetric_part(const MAT &A, MAT &B);
// B = anti-symmetric part of A

// ========== HEADER FILE src/matrix/testmatrix.h: ==========

bool report_symmetry(const MAT &A, const Type eps=1e-8);
// convenient quick hack

// ========== HEADER FILE src/matrix/toeplitz.h: ==========

void make_toeplitz(MAT &A, const Type *v);
// Set A to be the Toeplitz matrix
// with elements from v[] which needs to have 2*nc elements
// v[nc] is unused

void get_toeplitz_v(const MAT &A, Type *v);
// Extract vector v so that make_toeplitz(. , v) would create
// a Toeplitz matrix identical to A
// v[] needs to have 2*nc elements

void make_circulant(MAT &A, const Type *v);
// Set A to be the symmetric Toeplitz matrix
// with elements from v[] which needs to have nc elements

void make_weighted_circulant(MAT &A, const Type *v, Type z);
// Set A to be the circulant matrix
// with row_k multiplied with z^k
// with elements from v[] which needs to have nc elements

void get_circulant_v(const MAT &A, Type *v);
// Extract vector v so that make_circulant(. , v) would create
// a circulant matrix identical to A
// v[] needs to have nc elements

// ========== HEADER FILE src/matrix/vector.h: ==========

class vector : public array<Type>;
// Simple minded vector class

