Map dgCmatrix as integer sparse matrix

Đang mở
#132 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
r
Lĩnh vực
data

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C++
Star
118
Fork
43
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RcppCore/RcppEigen

Tất cả issue của RcppCore/RcppEigen

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.