MCPcopy Create free account
hub / github.com/PX4/eigen / setZero

Method setZero

Eigen/src/SparseCore/SparseMatrix.h:251–257  ·  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

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 *

Callers 2

set_from_tripletsFunction · 0.45
SparseMatrix.hFile · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected