.NET Matrix Library
SparseMatrix Constructor(Int32,Int32,Int32,Single)
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.
growFactor
The factor by which the capacity is multiplied when required.
Creates a new instance of a SparseMatrix with the specified number or rows and columns, initial capacity and grow factor.

Syntax

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

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.
growFactor
The factor by which the capacity is multiplied when required.

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.

The grow factor is the number by which the capacity is multiplied when additional storage is required. A grow factor that equals 2 doubles the capacity.

Requirements

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

See Also

.NET Matrix Library