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" 42 FMATVEC_EXPORT
int svd(Matrix<General, Ref, Ref, double> &A, Matrix<General, Ref, Ref, double> &S, SquareMatrix<Ref, double> &U, SquareMatrix<Ref, double> &VT,
int Rueckgabe);
50 FMATVEC_EXPORT Vector<Ref, std::complex<double>>
eigval(
const SquareMatrix<Ref, double> &A);
60 FMATVEC_EXPORT
int eigvec(
const SquareMatrix<Ref, double> &A, SquareMatrix<Ref, std::complex<double>> &V, Vector<Ref, std::complex<double>> &w);
72 FMATVEC_EXPORT
int eigvec(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Matrix<Symmetric, Ref, Ref, double> &B, SquareMatrix<Ref, double> &eigenvectors, Vector<Ref, double> &eigenvalues);
80 FMATVEC_EXPORT Vector<Ref, double>
eigval(
const Matrix<Symmetric, Ref, Ref, double> &A);
93 FMATVEC_EXPORT Vector<Ref, double>
eigvalSel(
const Matrix<Symmetric, Ref, Ref, double> &A,
int il,
int iu,
double abstol = 0);
127 FMATVEC_EXPORT Matrix<General, Ref, Ref, double>
slvLU(
const SquareMatrix<Ref, double> &A,
const Matrix<General, Ref, Ref, double> &X);
128 FMATVEC_EXPORT Matrix<General, Var, Var, double>
slvLU(
const SquareMatrix<Var, double> &A,
const Matrix<General, Var, Var, double> &X,
int & info);
139 FMATVEC_EXPORT Vector<Ref, double>
slvLU(
const SquareMatrix<Ref, double> &A,
const Vector<Ref, double> &x);
151 FMATVEC_EXPORT Vector<Ref, double>
slvLU(
const SquareMatrix<Ref, double> &A,
const Vector<Ref, double> &x,
int & info);
152 FMATVEC_EXPORT Vector<Var, double>
slvLU(
const SquareMatrix<Var, double> &A,
const Vector<Var, double> &x,
int & info);
164 FMATVEC_EXPORT Matrix<General, Ref, Ref, double>
slvLUFac(
const SquareMatrix<Ref, double> &A,
const Matrix<General, Ref, Ref, double> &X,
const Vector<Ref, int> &ipiv);
165 FMATVEC_EXPORT Matrix<General, Var, Var, double>
slvLUFac(
const SquareMatrix<Var, double> &A,
const Matrix<General, Var, Var, double> &X,
const Vector<Var, int> &ipiv);
177 FMATVEC_EXPORT Vector<Ref, double>
slvLUFac(
const SquareMatrix<Ref, double> &A,
const Vector<Ref, double> &x,
const Vector<Ref, int> &ipiv);
178 FMATVEC_EXPORT Vector<Var, double>
slvLUFac(
const SquareMatrix<Var, double> &A,
const Vector<Var, double> &x,
const Vector<Var, int> &ipiv);
189 FMATVEC_EXPORT Matrix<General, Ref, Ref, double>
slvLL(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Matrix<General, Ref, Ref, double> &X);
200 FMATVEC_EXPORT Vector<Ref, double>
slvLL(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Vector<Ref, double> &x);
211 FMATVEC_EXPORT Matrix<General, Ref, Ref, double>
slvQR(
const SquareMatrix<Ref, double> &A,
const Matrix<General, Ref, Ref, double> &X);
222 FMATVEC_EXPORT Vector<Ref, double>
slvQR(
const SquareMatrix<Ref, double> &A,
const Vector<Ref, double> &x);
231 FMATVEC_EXPORT SquareMatrix<Ref, double>
inv(
const SquareMatrix<Ref, double> &A);
240 FMATVEC_EXPORT Matrix<Symmetric, Ref, Ref, double>
inv(
const Matrix<Symmetric, Ref, Ref, double> &A);
249 FMATVEC_EXPORT Matrix<Diagonal, Ref, Ref, double>
inv(
const Matrix<Diagonal, Ref, Ref, double> &A);
259 FMATVEC_EXPORT Matrix<General, Ref, Ref, double>
facLU(
const Matrix<General, Ref, Ref, double> &A, Vector<Ref, int> &ipiv);
269 FMATVEC_EXPORT SquareMatrix<Ref, double>
facLU(
const SquareMatrix<Ref, double> &A, Vector<Ref, int> &ipiv);
271 FMATVEC_EXPORT SquareMatrix<Var, double>
facLU(
const SquareMatrix<Var, double> &A, Vector<Var, int> &ipiv);
284 FMATVEC_EXPORT
int facLU(
double *A,
int pivot[],
int n);
293 FMATVEC_EXPORT Matrix<Symmetric, Ref, Ref, double>
facLL(
const Matrix<Symmetric, Ref, Ref, double> &A);
301 FMATVEC_EXPORT
double nrm1(
const Vector<Ref, double> &x);
309 FMATVEC_EXPORT
double nrm2(
const Vector<Ref, double> &x);
317 FMATVEC_EXPORT
double nrmInf(
const Vector<Ref, double> &x);
326 FMATVEC_EXPORT
double nrm1(
const Matrix<General, Ref, Ref, double> &A);
334 FMATVEC_EXPORT
double nrm2(
const Matrix<General, Ref, Ref, double> &A);
343 FMATVEC_EXPORT
double nrmInf(
const Matrix<General, Ref, Ref, double> &A);
352 FMATVEC_EXPORT
double nrmInf(
const Matrix<Symmetric, Ref, Ref, double> &A);
360 FMATVEC_EXPORT
double nrmFro(
const Matrix<General, Ref, Ref, double> &A);
368 FMATVEC_EXPORT
double rho(
const SquareMatrix<Ref, double> &A);
376 FMATVEC_EXPORT
double rho(
const Matrix<Symmetric, Ref, Ref, double> &A);
378 FMATVEC_EXPORT Vector<Ref, double> slvLLFac(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Vector<Ref, double> &x);
380 FMATVEC_EXPORT Matrix<General, Ref, Ref, double> slvLLFac(
const Matrix<Symmetric, Ref, Ref, double> &A,
const Matrix<General, Ref, Ref, double> &X);
382 FMATVEC_EXPORT Matrix<General, Ref, Ref, double> slvLS(
const Matrix<General, Ref, Ref, double> &A,
const Matrix<General, Ref, Ref, double> &B,
double rcond = -1);
384 FMATVEC_EXPORT Vector<Ref, double> slvLS(
const Matrix<General, Ref, Ref, double> &A,
const Vector<Ref, double> &b,
double rcond = -1);
417 info =
facLU(LU(), ipiv, size);
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:723
Matrix< Symmetric, Ref, Ref, double > facLL(const Matrix< Symmetric, Ref, Ref, double > &A)
LL decomposition.
Definition: linear_algebra_double.cc:503
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:659
double nrm1(const Vector< Ref, double > &x)
1-norm
Definition: linear_algebra_double.cc:522
int Doolittle_LU_with_Pivoting_Solve(double *A, double B[], const int pivot[], double x[], int n)
solve linear system with LU decomposed matrix
Definition: linear_algebra_double.cc:164
Vector< Ref, double > eigvalSel(const Matrix< Symmetric, Ref, Ref, double > &A, int il, int iu, double abstol)
Eigenvalues.
Definition: linear_algebra_double.cc:764
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:47
Matrix< General, Ref, Ref, double > facLU(const Matrix< General, Ref, Ref, double > &A, Vector< Ref, int > &ipiv)
LU decomposition.
Definition: linear_algebra_double.cc:389
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:145
Namespace fmatvec.
Definition: _memory.cc:28
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:99
Vector< Ref, std::complex< double > > eigval(const SquareMatrix< Ref, double > &A)
Eigenvalues.
Definition: linear_algebra_double.cc:639
SquareMatrix< Ref, double > inv(const SquareMatrix< Ref, double > &A)
Inverse.
Definition: linear_algebra_double.cc:330
double nrmFro(const Matrix< General, Ref, Ref, double > &A)
Frobenius-norm.
Definition: linear_algebra_double.cc:836
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:547
double rho(const SquareMatrix< Ref, double > &A)
Spectral radius.
Definition: linear_algebra_double.cc:784