User`s guide
Utility Library Classes
Sub Clone(ppSparse As MWSparse)
Creates a copy of an MWSparse object.
Parameters.
Argument Type Description
ppSparse MWSparse
Referencetoan
uninitialized
MWSparse
object to receive the
copy
Return Value. None.
Remarks.
Clone allocates a new MWSparse object and creates a deep copy
of the o bject’s contents. Call this function when a separate object is required
instead of a shared copy of an existing o bject refere nce.
Example. The following Visual Basic sample creates a 5-by-5 tridiagonal
sparse array with the following entries:
X=[2-1 0 0 0
-1 2 -1 0 0
0-12-1 0
00-1 2-1
000-1 2]
Sub foo()
Dim x As MWSparse
Dim rows(1 To 13) As Long
Dim cols(1 To 13) As Long
Dim vals(1 To 13) As Double
Dim I As Long, K As Long
On Error GoTo Handle_Error
K=1
ForI=1To4
rows(K) = I
cols(K) = I + 1
C-29