11 #include "rrOSSpecifics.h"
27 typedef struct csr_matrix_t
80 csr_matrix* csr_matrix_new(
unsigned m,
unsigned n,
81 const std::vector<unsigned>& rowidx,
const std::vector<unsigned>& colidx,
82 const std::vector<double>& values);
88 void csr_matrix_delete(csr_matrix *mat);
95 bool csr_matrix_set_nz(csr_matrix *mat,
unsigned row,
unsigned col,
double val);
102 double csr_matrix_get_nz(
const csr_matrix *mat,
unsigned row,
unsigned col);
112 void csr_matrix_dgemv(
double alpha,
const csr_matrix *A,
113 double const *x,
double beta,
double *y);
121 double csr_matrix_ddot(
size_t row,
const csr_matrix *x,
const double *y);
126 void csr_matrix_fill_dense(
const csr_matrix *x,
double *dense);
128 void csr_matrix_dump_binary(
const csr_matrix *x, std::ostream& out);
129 csr_matrix* csr_matrix_new_from_binary(std::istream&);
133 std::ostream& operator<< (std::ostream& os,
const csr_matrix* mat);