MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / resize

Method resize

include/Eigen/src/SparseCore/SparseMatrix.h:730–745  ·  view source on GitHub ↗

Resizes the matrix to a \a rows x \a cols matrix and initializes it to zero. * * 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 reserve(), setZero() */

Source from the content-addressed store, hash-verified

728 * \sa reserve(), setZero()
729 */
730 void resize(Index rows, Index cols) {
731 const Index outerSize = IsRowMajor ? rows : cols;
732 m_innerSize = IsRowMajor ? cols : rows;
733 m_data.clear();
734
735 if ((m_outerIndex == 0) || (m_outerSize != outerSize)) {
736 m_outerIndex = internal::conditional_aligned_realloc_new_auto<StorageIndex, true>(m_outerIndex, outerSize + 1,
737 m_outerSize + 1);
738 m_outerSize = outerSize;
739 }
740
741 internal::conditional_aligned_delete_auto<StorageIndex, true>(m_innerNonZeros, m_outerSize);
742 m_innerNonZeros = 0;
743
744 std::fill_n(m_outerIndex, m_outerSize + 1, StorageIndex(0));
745 }
746
747 /** \internal
748 * Resize the nonzero vector to \a size */

Callers 11

reserveInnerVectorsMethod · 0.45
makeCompressedMethod · 0.45
pruneMethod · 0.45
conservativeResizeMethod · 0.45
resizeNonZerosMethod · 0.45
setIdentityMethod · 0.45
assignDiagonalMethod · 0.45
set_from_triplets_sortedFunction · 0.45
collapseDuplicatesMethod · 0.45
SparseMatrix.hFile · 0.45
deserializeMethod · 0.45

Calls 2

fill_nFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected