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() */
| 301 | * \sa resize(Index,Index), data() |
| 302 | */ |
| 303 | inline void setZero() { |
| 304 | m_data.clear(); |
| 305 | std::fill_n(m_outerIndex, m_outerSize + 1, StorageIndex(0)); |
| 306 | if (m_innerNonZeros) { |
| 307 | std::fill_n(m_innerNonZeros, m_outerSize, StorageIndex(0)); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | /** Preallocates \a reserveSize non zeros. |
| 312 | * |
no test coverage detected