22 #ifndef linear_algebrad_h
23 #define linear_algebrad_h
25 #include "square_matrix.h"
27 #include "row_vector.h"
28 #include "diagonal_matrix.h"
29 #include "symmetric_matrix.h"
30 #include "band_matrix.h"
41 int svd(Matrix<General, Ref, Ref, double> &A, Matrix<General, Ref, Ref, double> &S, SquareMatrix<Ref, double> &U, SquareMatrix<Ref, double> &VT,
int Rueckgabe);
49 Vector<Ref, std::complex<double> >
eigval(
const SquareMatrix<Ref, double> &A);
59 int eigvec(
const SquareMatrix<Ref, double> &A, SquareMatrix<Ref, std::complex<double> > &eigenvectors, Vector<Ref, std::complex<double> > &eigenvalues);
71 int eigvec(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Matrix<Symmetric, Ref, Ref, double> &B, SquareMatrix<Ref, double> &eigenvectors, Vector<Ref, double> &eigenvalues);
79 Vector<Ref, double>
eigval(
const Matrix<Symmetric, Ref, Ref, double> &A);
92 Vector<Ref, double>
eigvalSel(
const Matrix<Symmetric, Ref, Ref, double> &A,
int il,
int iu,
double abstol = 0);
126 Matrix<General, Ref, Ref, double>
slvLU(
const SquareMatrix<Ref, double> &A,
const Matrix<General, Ref, Ref, double> &B);
127 Matrix<General, Var, Var, double>
slvLU(
const SquareMatrix<Var, double> &A,
const Matrix<General, Var, Var, double> &B,
int & info);
138 Vector<Ref, double>
slvLU(
const SquareMatrix<Ref, double> &A,
const Vector<Ref, double> &b);
150 Vector<Ref, double>
slvLU(
const SquareMatrix<Ref, double> &A,
const Vector<Ref, double> &x,
int & info);
151 Vector<Var, double>
slvLU(
const SquareMatrix<Var, double> &A,
const Vector<Var, double> &b,
int & info);
163 Matrix<General, Ref, Ref, double>
slvLUFac(
const SquareMatrix<Ref, double> &A,
const Matrix<General, Ref, Ref, double> &B,
const Vector<Ref, int> &ipiv);
164 Matrix<General, Var, Var, double>
slvLUFac(
const SquareMatrix<Var, double> &ALU,
const Matrix<General, Var, Var, double> &B,
const Vector<Var, int> &ipiv);
176 Vector<Ref, double>
slvLUFac(
const SquareMatrix<Ref, double> &A,
const Vector<Ref, double> &b,
const Vector<Ref, int> &ipiv);
177 Vector<Var, double>
slvLUFac(
const SquareMatrix<Var, double> &ALU,
const Vector<Var, double> &b,
const Vector<Var, int> &ipiv);
188 Matrix<General, Ref, Ref, double>
slvLL(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Matrix<General, Ref, Ref, double> &B);
199 Vector<Ref, double>
slvLL(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Vector<Ref, double> &b);
210 Matrix<General, Ref, Ref, double>
slvQR(
const SquareMatrix<Ref, double> &A,
const Matrix<General, Ref, Ref, double> &B);
221 Vector<Ref, double>
slvQR(
const SquareMatrix<Ref, double> &A,
const Vector<Ref, double> &b);
230 SquareMatrix<Ref, double>
inv(
const SquareMatrix<Ref, double> &A);
239 Matrix<Symmetric, Ref, Ref, double>
inv(
const Matrix<Symmetric, Ref, Ref, double> &A);
248 Matrix<Diagonal, Ref, Ref, double>
inv(
const Matrix<Diagonal, Ref, Ref, double> &A);
258 Matrix<General, Ref, Ref, double>
facLU(
const Matrix<General, Ref, Ref, double> &A, Vector<Ref, int> &ipiv);
268 SquareMatrix<Ref, double>
facLU(
const SquareMatrix<Ref, double> &A, Vector<Ref, int> &ipiv);
270 SquareMatrix<Var, double>
facLU(
const SquareMatrix<Var, double> &A, Vector<Var, int> &ipiv);
283 int facLU(
double *A,
int pivot[],
int n);
292 Matrix<Symmetric, Ref, Ref, double>
facLL(
const Matrix<Symmetric, Ref, Ref, double> &A);
300 double nrm1(
const Vector<Ref, double> &x);
308 double nrm2(
const Vector<Ref, double> &x);
316 double nrmInf(
const Vector<Ref, double> &x);
325 double nrm1(
const Matrix<General, Ref, Ref, double> &A);
333 double nrm2(
const Matrix<General, Ref, Ref, double> &A);
342 double nrmInf(
const Matrix<General, Ref, Ref, double> &A);
351 double nrmInf(
const Matrix<Symmetric, Ref, Ref, double> &A);
359 double nrmFro(
const Matrix<General, Ref, Ref, double> &A);
367 double rho(
const SquareMatrix<Ref, double> &A);
375 double rho(
const Matrix<Symmetric, Ref, Ref, double> &A);
377 Vector<Ref, double> slvLLFac(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Vector<Ref, double> &x);
379 Matrix<General, Ref, Ref, double> slvLLFac(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Matrix<General, Ref, Ref, double> &X);
381 Matrix<General, Ref, Ref, double> slvLS(
const Matrix<General, Ref, Ref, double> &A,
const Matrix<General, Ref, Ref, double> &B,
double rcond = -1);
383 Vector<Ref, double> slvLS(
const Matrix<General, Ref, Ref, double> &A,
const Vector<Ref, double> &b,
double rcond = -1);
409 #ifndef FMATVEC_NO_VOID_CHECK
418 info =
facLU(LU(), ipiv, size);
double rho(const SquareMatrix< Ref, double > &A)
Spectral radius.
Definition: linear_algebra_double.cc:876
Matrix< Symmetric, Ref, Ref, double > facLL(const Matrix< Symmetric, Ref, Ref, double > &A)
LL decomposition.
Definition: linear_algebra_double.cc:571
Vector< Ref, std::complex< double > > eigval(const SquareMatrix< Ref, double > &A)
Eigenvalues.
Definition: linear_algebra_double.cc:731
Matrix< General, Ref, Ref, double > slvLUFac(const SquareMatrix< Ref, double > &A, const Matrix< General, Ref, Ref, double > &X, const Vector< Ref, int > &ipiv)
Systems of linear equations.
Definition: linear_algebra_double.cc:119
int eigvec(const SquareMatrix< Ref, double > &A, SquareMatrix< Ref, std::complex< double > > &V, Vector< Ref, std::complex< double > > &w)
Eigenvectors and Eigenvalues.
Definition: linear_algebra_double.cc:751
Matrix< General, Ref, Ref, double > facLU(const Matrix< General, Ref, Ref, double > &A, Vector< Ref, int > &ipiv)
LU decomposition.
Definition: linear_algebra_double.cc:451
Vector< Ref, double > eigvalSel(const Matrix< Symmetric, Ref, Ref, double > &A, int il, int iu, double abstol)
Eigenvalues.
Definition: linear_algebra_double.cc:856
double nrmFro(const Matrix< General, Ref, Ref, double > &A)
Frobenius-norm.
Definition: linear_algebra_double.cc:938
Matrix< General, Ref, Ref, double > slvQR(const SquareMatrix< Ref, double > &A, const Matrix< General, Ref, Ref, double > &X)
Systems of linear equations.
Definition: linear_algebra_double.cc:173
SquareMatrix< Ref, double > inv(const SquareMatrix< Ref, double > &A)
Inverse.
Definition: linear_algebra_double.cc:386
int Doolittle_LU_with_Pivoting_Solve(double *A, double B[], int pivot[], double x[], int n)
solve linear system with LU decomposed matrix
Definition: linear_algebra_double.cc:196
Vector< Ref, std::complex< double > > slvLU(const SquareMatrix< Ref, std::complex< double > > &A, const Vector< Ref, std::complex< double > > &x)
System of linear equations.
Definition: linear_algebra_complex.cc:61
Vector< Ref, double > slvLL(const Matrix< Symmetric, Ref, Ref, double > &A, const Vector< Ref, double > &x)
System of linear equations.
Definition: linear_algebra_double.cc:623
int svd(Matrix< General, Ref, Ref, double > &A, Matrix< General, Ref, Ref, double > &S, SquareMatrix< Ref, double > &U, SquareMatrix< Ref, double > &VT, int Rueckgabe)
Definition: linear_algebra_double.cc:815
double nrm1(const Vector< Ref, double > &x)
1-norm
Definition: linear_algebra_double.cc:592