.NET Matrix Library
RemoveZeros(Double) Method
See Also  Send Feedback



tolerance
A double value. Elements with absolute value smaller than tolerance will be removed.
Removes all elements with absolute value smaller than the specified tolerance.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub RemoveZeros( _
   ByVal tolerance As Double _
) 
Visual Basic (Usage)Copy Code
Dim instance As SparseMatrix
Dim tolerance As Double
 
instance.RemoveZeros(tolerance)
C# 
public void RemoveZeros( 
   double tolerance
)
C++/CLI 
public:
void RemoveZeros( 
   double tolerance
) 

Parameters

tolerance
A double value. Elements with absolute value smaller than tolerance will be removed.

Remarks

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.

Requirements

Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7

See Also

.NET Matrix Library