21 #ifndef TNT_SPARSE_MATRIX_CSR_H
22 #define TNT_SPARSE_MATRIX_CSR_H
62 const int *r,
const int *c);
66 inline const T&
val(
int i)
const {
return val_[i]; }
96 const T *val,
const int *r,
const int *c) : val_(nz,val),
97 rowptr_(M, (int*)r), colind_(nz, (int*)c), dim1_(M), dim2_(N) {}
Definition: tnt_array1d.h:40
Definition: tnt_sparse_matrix_csr.h:48
int dim1_
Definition: tnt_sparse_matrix_csr.h:55
const int & row_ptr(int i) const
Definition: tnt_sparse_matrix_csr.h:67
int dim1() const
Definition: tnt_sparse_matrix_csr.h:70
int NumNonzeros() const
Definition: tnt_sparse_matrix_csr.h:72
Array1D< T > val_
Definition: tnt_sparse_matrix_csr.h:51
const T & val(int i) const
Definition: tnt_sparse_matrix_csr.h:66
Sparse_Matrix_CompRow & operator=(const Sparse_Matrix_CompRow &R)
int dim2_
Definition: tnt_sparse_matrix_csr.h:56
int dim2() const
Definition: tnt_sparse_matrix_csr.h:71
Array1D< int > colind_
Definition: tnt_sparse_matrix_csr.h:53
Sparse_Matrix_CompRow(const Sparse_Matrix_CompRow &S)
const int & col_ind(int i) const
Definition: tnt_sparse_matrix_csr.h:68
Array1D< int > rowptr_
Definition: tnt_sparse_matrix_csr.h:52
Definition: tnt_array1d.h:36