1 #include "../../../include/common/monolish_dense.hpp"
2 #include "../../../include/common/monolish_logger.hpp"
3 #include "../../../include/common/monolish_matrix.hpp"
4 #include "../../internal/monolish_internal.hpp"
13 set_row(crs.get_row());
14 set_col(crs.get_col());
15 set_nnz(crs.get_nnz());
17 row_index.resize(nnz);
18 col_index.resize(nnz);
21 for (
size_t i = 0; i < get_row(); i++) {
22 for (
size_t j = (
size_t)crs.row_ptr[i]; j < (size_t)crs.row_ptr[i + 1];
25 col_index[j] = crs.col_ind[j];
39 set_row(dense.get_row());
40 set_col(dense.get_col());
46 for (
size_t i = 0; i < dense.get_row(); i++) {
47 for (
size_t j = 0; j < dense.get_col(); j++) {
48 if (dense.at(i, j) != 0) {
49 row_index.push_back(i);
50 col_index.push_back(j);
51 val.push_back(dense.at(i, j));
68 Dense<T> dense(linearoperator.get_row(), linearoperator.get_col());
69 linearoperator.convert_to_Dense(dense);