Map dgCmatrix as integer sparse matrix
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- C++
- Sterne
- 118
- Forks
- 43
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus RcppCore/RcppEigen
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Alle Issues in RcppCore/RcppEigen
Ähnliche Issues
-
Website Doc Typo Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 92/100
autowarefoundation/autoware_universe#13413 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
automated-analysis bug memory-safety
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100