Removes all non zeros but keep allocated memory * * This function does not free the currently allocated memory. To release as much as memory as possible, * call \code mat.data().squeeze(); \endcode after resizing it. * * \sa resize(Index,Index), data() */
| 286 | * \sa resize(Index,Index), data() |
| 287 | */ |
| 288 | inline void setZero() |
| 289 | { |
| 290 | m_data.clear(); |
| 291 | std::fill_n(m_outerIndex, m_outerSize + 1, StorageIndex(0)); |
| 292 | if(m_innerNonZeros) { |
| 293 | std::fill_n(m_innerNonZeros, m_outerSize, StorageIndex(0)); |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | /** Preallocates \a reserveSize non zeros. |
| 298 | * |
no test coverage detected