MPQC  3.0.0-alpha
svd.h
1 //
2 // svd.h
3 //
4 // Copyright (C) 2005 Edward Valeev
5 //
6 // Author: Edward Valeev <evaleev@vt.edu>
7 // Maintainer: EV
8 //
9 // This file is part of the SC Toolkit.
10 //
11 // The SC Toolkit is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Library General Public License as published by
13 // the Free Software Foundation; either version 2, or (at your option)
14 // any later version.
15 //
16 // The SC Toolkit is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Library General Public License for more details.
20 //
21 // You should have received a copy of the GNU Library General Public License
22 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 //
25 // The U.S. Government is granted a limited license as per AL 91-7.
26 //
27 
28 #ifndef _chemistry_qc_mbptr12_svd_h
29 #define _chemistry_qc_mbptr12_svd_h
30 
31 #include <math/scmat/matrix.h>
32 #include <math/scmat/blas.h>
33 
34 namespace sc {
35 
39  void lapack_svd(const RefSCMatrix& A, RefSCMatrix& U, RefDiagSCMatrix& Sigma,
40  RefSCMatrix& V);
41 
46  double lapack_linsolv_symmnondef(const RefSymmSCMatrix& A, RefSCVector& X,
47  const RefSCVector& B);
48 
53  double lapack_linsolv_symmnondef(const RefSymmSCMatrix& A, RefSCMatrix& X,
54  const RefSCMatrix& B);
55 
61  double lapack_linsolv_symmnondef(const double* AP, int nA, double* Xt,
62  const double* Bt, int ncolB);
63 
71  void lapack_invert_symmnondef(RefSymmSCMatrix& A,
72  double condition_number_threshold = 0.0);
73 
88  void lapack_dpf_symmnondef(const RefSymmSCMatrix& A, double* AF, blasint* ipiv,
89  double condition_number_threshold = 0.0);
90 
98  void lapack_invert_symmposdef(RefSymmSCMatrix& A,
99  double condition_number_threshold = 0.0);
100 
113  void lapack_linsolv_dpf_symmnondef(const double* A, int nA, const double* AF,
114  const blasint* ipiv, double* Xt,
115  const double* Bt, int ncolB,
116  bool refine = true);
117 
123  double linsolv_symmnondef_jacobi(const RefSymmSCMatrix& A, RefSCVector& X,
124  const RefSCVector& B);
125 
130  double linsolv_symmnondef_cg(const RefSymmSCMatrix& A, RefSCVector& X,
131  const RefSCVector& B);
132 
145  void lapack_cholesky_symmposdef(const RefSymmSCMatrix& A, double* AF,
146  double condition_number_threshold = 0.0);
147 
159  void lapack_linsolv_cholesky_symmposdef(const double* A, int nA,
160  const double* AF, double* Xt,
161  const double* Bt, int ncolB,
162  bool refine = true);
163 
164 }
165 
166 #endif
167 
168 // Local Variables:
169 // mode: c++
170 // c-file-style: "CLJ"
171 // End:
172 
173 
sc::lapack_dpf_symmnondef
void lapack_dpf_symmnondef(const RefSymmSCMatrix &A, double *AF, blasint *ipiv, double condition_number_threshold=0.0)
Compute factorization of a symmetric non-definite matrix using DSPTRF LAPACK routine that implements ...
sc::linsolv_symmnondef_jacobi
double linsolv_symmnondef_jacobi(const RefSymmSCMatrix &A, RefSCVector &X, const RefSCVector &B)
Solves symmetric non-definite linear system AX = B, where B is a RefSCVector, using Jacobi solver.
sc::lapack_invert_symmposdef
void lapack_invert_symmposdef(RefSymmSCMatrix &A, double condition_number_threshold=0.0)
invert symmetric positive-definite matrix using DPPTRF LAPACK routine that implements the Cholesky me...
sc::lapack_svd
void lapack_svd(const RefSCMatrix &A, RefSCMatrix &U, RefDiagSCMatrix &Sigma, RefSCMatrix &V)
Uses LAPACK's DGESVD to perform SVD of A: A = U * Sigma * V.
sc::lapack_invert_symmnondef
void lapack_invert_symmnondef(RefSymmSCMatrix &A, double condition_number_threshold=0.0)
invert symmetric non-definite matrix using DSPTRF LAPACK routine that implements the Bunch-Kaufman di...
sc::lapack_linsolv_dpf_symmnondef
void lapack_linsolv_dpf_symmnondef(const double *A, int nA, const double *AF, const blasint *ipiv, double *Xt, const double *Bt, int ncolB, bool refine=true)
Solves a symmetric indefinite system of linear equations AX=B, where A is held in packed storage,...
sc::linsolv_symmnondef_cg
double linsolv_symmnondef_cg(const RefSymmSCMatrix &A, RefSCVector &X, const RefSCVector &B)
Solves symmetric non-definite linear system AX = B, where B is a RefSCVector, using conjugate gradien...
sc::lapack_linsolv_symmnondef
double lapack_linsolv_symmnondef(const RefSymmSCMatrix &A, RefSCVector &X, const RefSCVector &B)
Uses LAPACK's DSPSVX to solve symmetric non-definite linear system AX = B, where B is a single vector...
sc::lapack_linsolv_cholesky_symmposdef
void lapack_linsolv_cholesky_symmposdef(const double *A, int nA, const double *AF, double *Xt, const double *Bt, int ncolB, bool refine=true)
Solves a symmetric indefinite system of linear equations AX=B, where A is held in packed storage,...
sc::lapack_cholesky_symmposdef
void lapack_cholesky_symmposdef(const RefSymmSCMatrix &A, double *AF, double condition_number_threshold=0.0)
Compute factorization of a symmetric positive-definite matrix using DPPTRF LAPACK routine that implem...
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

Generated at Sun Jan 26 2020 23:24:00 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.