Description Details Author(s) References Examples
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:
This package was not yet installed at build time.
Index: This package was not yet installed at build time.
Yongwen Zhuang
[1] Reeves Fletcher and Colin M Reeves. <e2><80><9c>Function minimization by conjugate gradients<e2><80><9d>. In: The computer journal 7.2 (1964), pp. 149<e2><80><93>154.
[2] David S Kershaw. <e2><80><9c>The incomplete Cholesky<e2><80><94>conjugate gradient method for the iter- ative solution of systems of linear equations<e2><80><9d>. In: Journal of computational physics 26.1 (1978), pp. 43<e2><80><93>65.
[3] Yousef Saad. Iterative methods for sparse linear systems. Vol. 82. siam, 2003.
[4] David Young. <e2><80><9c>Iterative methods for solving partial difference equations of elliptic type<e2><80><9d>. In: Transactions of the American Mathematical Society 76.1 (1954), pp. 92<e2><80><93>111.
1 2 3 4 5 6 7 8 9 10 | # 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.