24 unsigned rowsz, colsz;
29 sparse_mat(
int s=0,
int o=0): rowsz(s), colsz(s), diag(s), val(o), row(o), col(o) {}
32 rowsz=x.rowsz; colsz=x.colsz;
33 diag=x.diag; val=x.val;
37 template <
class E>
typename 45 assert(diag.
size()==x.size());
60 rowsz=x.rowsz; colsz=x.colsz;
61 diag=x.diag; val=x.val;
68 void insert(
const sparse_mat& x,
unsigned where,
unsigned old_size);
71 void init_rand(
unsigned conn,
double sigma);
78 std::swap(r.row,r.col);
79 std::swap(r.rowsz,r.colsz);
84 #include "sparse_mat.cd" sparse_mat tr(const sparse_mat &x)
transpose matrix
Definition: sparse_mat.h:75
sparse matrix class
Definition: sparse_mat.h:20
size_t size() const
number of elements
Definition: arrays.h:1766
_OPENMP
Definition: accessor.h:16
void resize(size_t s)
resize array to s elements
Definition: arrays.h:1599