MCPcopy Create free account
hub / github.com/XJTU-Graphics/dandelion / setZero

Method setZero

deps/Eigen/src/SparseCore/SparseMatrix.h:303–309  ·  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

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 *

Callers 3

assignDiagonalMethod · 0.45
SparseMatrix.hFile · 0.45
deserializeMethod · 0.45

Calls 2

fill_nFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected