Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWIP sparse matrix classes #16
Conversation
| svds_real_gen(A, k, nu, nv, opts, mattype = "dgRMatrix") | ||
| { | ||
| fun = if(isSymmetric(A)) svds_real_sym else svds_real_gen | ||
| fun(A, k, nu, nv, opts, mattype = "dgRMatrix") |
flying-sheep
May 2, 2019
Author
Contributor
i just read above that “isSymmetric doesn’t support dgRMatrix”, but maybe we can convert dgRMatrix to dsRMatrix?
i just read above that “isSymmetric doesn’t support dgRMatrix”, but maybe we can convert dgRMatrix to dsRMatrix?
| @@ -20,6 +20,10 @@ | |||
| ##' the \strong{Matrix} package.\cr | |||
| ##' \code{dsyMatrix} \tab Symmetrix matrix, defined in the \strong{Matrix} | |||
flying-sheep
May 2, 2019
Author
Contributor
I fixed that typo in the other file.
I fixed that typo in the other file.
| ##' @rdname eigs | ||
| ##' @export | ||
| ## isSymmetric() does not support dgRMatrix | ||
| eigs.dgRMatrix <- function(A, k, which = "LM", sigma = NULL, opts = list(), ...) | ||
| eigs_real_gen(A, nrow(A), k, which, sigma, opts, mattype = "dgRMatrix") | ||
|
|
||
| ##' @rdname eigs | ||
| ##' @export | ||
| eigs.dsRMatrix <- eigs.dgRMatrix |
flying-sheep
May 2, 2019
Author
Contributor
Without code delegating to eigs_real_sym in eigs.dgRMatrix, this is wrong.
Without code delegating to eigs_real_sym in eigs.dgRMatrix, this is wrong.
| )) { | ||
| if (which == "LR") which = "LA" | ||
| if (which == "SR") which = "SA" | ||
| eigs_real_sym(A, nrow(A), k, which, sigma, opts, mattype = "dsCMatrix", | ||
| extra_args = list(use_lower = TRUE)) |
flying-sheep
May 2, 2019
Author
Contributor
I think this should be split: extra_args should only be passed when calling this on a dgCMatrix, or we should forget about extra_args here and convert symmetric any dgCMatrix to a dsCMatrix.
I think this should be split: extra_args should only be passed when calling this on a dgCMatrix, or we should forget about extra_args here and convert symmetric any dgCMatrix to a dsCMatrix.
|
This is great work. Thank you! |
|
@flying-sheep Thanks for your nice work! |
|
You can just push commits to my branch, no? |
|
Oh, I can work on my side. I just meant that I might not have time until some weekends. |
|
Just got some time to address these issues and I think it now fully supports |
Fixes #15 when ready