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() */
| 249 | * \sa resize(Index,Index), data() |
| 250 | */ |
| 251 | inline void setZero() |
| 252 | { |
| 253 | m_data.clear(); |
| 254 | memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(StorageIndex)); |
| 255 | if(m_innerNonZeros) |
| 256 | memset(m_innerNonZeros, 0, (m_outerSize)*sizeof(StorageIndex)); |
| 257 | } |
| 258 | |
| 259 | /** Preallocates \a reserveSize non zeros. |
| 260 | * |
no test coverage detected