Map dgCmatrix as integer sparse matrix
還沒有人認領這個 Issue。
評估
研究方向
Start with the RcppEigen sparse-matrix mapping entry points used by Eigen::Map and the dgCmatrix/ngCmatrix types described in the issue. Determine whether integer mapping avoids deep copies and define what support for ngCmatrix would require; done should include verified behavior and coverage for the requested mapping.
由索引模型根據 Issue 內容生成。
描述
Dear developers,
I have a dgCmatrix in R and want to call a function as below in cpp to deal with it.
Eigen::SparseMatrix calc_overlap(Eigen::Map<Eigen::SparseMatrix<int>>& cc_adj,
Eigen::Map<Eigen::SparseMatrix<int>>& cg_adj,
double threshold) {
Eigen::SparseMatrix<int> overlap_mat_all = cc_adj * cg_adj;
return overlap_mat_all;
}
The dgCmatrix 'cc_adj' and 'cg_adj' in R are large sparse matrices with integer values. I want to calculate the product of them by cpp. I used 'Map' to get rid of deep copies of these two large matrices. The scalar <int> is used to save memory. There is no error raised up when mapping to a dgCmatrix with <int>. but I'm not sure how it's working exactly. I guess the function makes deep copies instead, so the mapping doesn't work at all. Is it right?
My concern is that since you only allow mapping to dgCmatrix format sparse matrix for now, is there any possibility that you could wrap up a function to deal with 'ngCmatrix'?
Looking forward to your kind reply.
- 主要語言
- C++
- 星號
- 118
- 分支
- 43
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
RcppCore/RcppEigen 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 45/100
-
難度 4/5 3-5 天 新手友好度 25/100
-
難度 5/5 一週以上 新手友好度 20/100
-
難度 2/5 1-3 小時 新手友好度 35/100
-
難度 4/5 3-5 天 新手友好度 35/100
查看 RcppCore/RcppEigen 的全部 Issue
相似的 Issue
-
enhancement
難度 1/5 1 小時以內 新手友好度 88/100
QuantStack/git2cpp#187 ·
-
難度 2/5 1-3 小時 新手友好度 86/100
-
難度 2/5 1-3 小時 新手友好度 84/100
mlcommons/mobile_app_open#1182 ·
-
Needs-Triage
難度 2/5 1-3 小時 新手友好度 78/100
microsoft/winget-cli#6547 ·
-
難度 1/5 1 小時以內 新手友好度 90/100
AXERA-TECH/ax-llm#77 ·