mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
Doc: explain how to free allocated memory in SparseMAtrix
This commit is contained in:
parent
98604576d1
commit
953d5ccfd5
@ -243,7 +243,13 @@ class SparseMatrix
|
||||
|
||||
public:
|
||||
|
||||
/** Removes all non zeros but keep allocated memory */
|
||||
/** 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()
|
||||
*/
|
||||
inline void setZero()
|
||||
{
|
||||
m_data.clear();
|
||||
@ -601,6 +607,10 @@ class SparseMatrix
|
||||
}
|
||||
|
||||
/** 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 resizeNonZeros(Index), reserve(), setZero()
|
||||
*/
|
||||
void resize(Index rows, Index cols)
|
||||
|
Loading…
Reference in New Issue
Block a user