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