cPCG-package {cPCG} | R Documentation |
Solves system of linear equations using (preconditioned) conjugate gradient algorithm, with improved efficiency using Armadillo templated 'C++' linear algebra library, and flexibility for user-specified preconditioning method. Please check <https://github.com/styvon/cPCG> for latest updates.
Functions in this package serve the purpose of solving for x in Ax = b, where A is a symmetric and positive definite matrix, b is a column vector.
To improve scalability of conjugate gradient methods for larger matrices, the Armadillo
templated C++ linear algebra library is used for the implementation. The package also provides flexibility to have user-specified preconditioner options to cater for different optimization needs.
The DESCRIPTION file:
Package: | cPCG |
Type: | Package |
Title: | Efficient and Customized Preconditioned Conjugate Gradient Method for Solving System of Linear Equations |
Version: | 1.0 |
Date: | 2018-12-30 |
Author: | Yongwen Zhuang |
Maintainer: | Yongwen Zhuang <zyongwen@umich.edu> |
Description: | Solves system of linear equations using (preconditioned) conjugate gradient algorithm, with improved efficiency using Armadillo templated 'C++' linear algebra library, and flexibility for user-specified preconditioning method. Please check <https://github.com/styvon/cPCG> for latest updates. |
Depends: | R (>= 3.0.0) |
License: | GPL (>= 2) |
Imports: | Rcpp (>= 0.12.19) |
LinkingTo: | Rcpp, RcppArmadillo |
RoxygenNote: | 6.1.1 |
Encoding: | UTF-8 |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
Index of help topics:
cPCG-package Efficient and Customized Preconditioned Conjugate Gradient Method for Solving System of Linear Equations cgsolve Conjugate gradient method icc Incomplete Cholesky Factorization pcgsolve Preconditioned conjugate gradient method
Yongwen Zhuang
[1] Reeves Fletcher and Colin M Reeves. “Function minimization by conjugate gradients”. In: The computer journal 7.2 (1964), pp. 149–154.
[2] David S Kershaw. “The incomplete Cholesky—conjugate gradient method for the iter- ative solution of systems of linear equations”. In: Journal of computational physics 26.1 (1978), pp. 43–65.
[3] Yousef Saad. Iterative methods for sparse linear systems. Vol. 82. siam, 2003.
[4] David Young. “Iterative methods for solving partial difference equations of elliptic type”. In: Transactions of the American Mathematical Society 76.1 (1954), pp. 92–111.
# generate test data test_A <- matrix(c(4,1,1,3), ncol = 2) test_b <- matrix(1:2, ncol = 1) # conjugate gradient method solver cgsolve(test_A, test_b, 1e-6, 1000) # preconditioned conjugate gradient method solver, # with incomplete Cholesky factorization as preconditioner pcgsolve(test_A, test_b, "ICC")