.NET Matrix Library
SparseMatrix Constructor(Int32,Int32,Int32)
See Also  Send Feedback



rows
The number of rows of the sparse matrix.
cols
The number of columns of the sparse matrix.
capacity
Specifies the maximum number of elements that the internal storage can hold without resizing.
Creates a new instance of a SparseMatrix with the specified number or rows and columns and initial capacity.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal rows As Integer, _
   ByVal cols As Integer, _
   ByVal capacity As Integer _
)
Visual Basic (Usage)Copy Code
Dim rows As Integer
Dim cols As Integer
Dim capacity As Integer
 
Dim instance As New SparseMatrix(rows, cols, capacity)
C# 
public SparseMatrix( 
   int rows,
   int cols,
   int capacity
)
C++/CLI 
public:
SparseMatrix( 
   int rows,
   int cols,
   int capacity
)

Parameters

rows
The number of rows of the sparse matrix.
cols
The number of columns of the sparse matrix.
capacity
Specifies the maximum number of elements that the internal storage can hold without resizing.

Remarks

The internal storage of the SparseMatrix is dynamically increased when required but it is preferable to allocate the required space from the beginning, if the number of elements is known.

Requirements

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

See Also

.NET Matrix Library