MCPcopy Create free account
hub / github.com/dblalock/bolt / setZero

Method setZero

cpp/src/external/eigen/src/SparseCore/SparseMatrix.h:246–252  ·  view source on GitHub ↗

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() */

Source from the content-addressed store, hash-verified

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 *

Callers 2

set_from_tripletsFunction · 0.45
SparseMatrix.hFile · 0.45

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected