mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +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:
|
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()
|
inline void setZero()
|
||||||
{
|
{
|
||||||
m_data.clear();
|
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.
|
/** 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()
|
* \sa resizeNonZeros(Index), reserve(), setZero()
|
||||||
*/
|
*/
|
||||||
void resize(Index rows, Index cols)
|
void resize(Index rows, Index cols)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user