| Visual Basic (Usage) | |
|---|---|
Dim instance As SparseMatrix Dim tolerance As Double instance.RemoveZeros(tolerance) | |
Parameters
- tolerance
- A double value. Elements with absolute value smaller than tolerance will be removed.
Although the SparseMatrix Class class is designed to store only the non zero elements, it is possible to store zero elements either by direct assignment or as a result of a computation.
The RemoveZeros method removes those elements thus making possible to release unused memory.
The absolute value of each element is compared with of tolerance and if it is smaller it is removed.
Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7