Skip to content
Snippets Groups Projects
Commit bfd3eb42 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Add CRSMatrix::setZero().

parent c91c3078
No related branches found
No related tags found
No related merge requests found
......@@ -82,8 +82,13 @@ public:
// reserve memory for _data
_data = new FP_TYPE [nnz];
// initialize entries with zero
std::fill_n(_data, nnz, 0.0);
setZero();
}
/// Reset data entries to zero.
virtual void setZero()
{
std::fill_n(_data, _row_ptr[this->_n_rows], 0);
}
virtual ~CRSMatrix()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment