Function

SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:)

Returns a sparse matrix of double-precision, floating-point values created from the individual coordinate format arrays.

Declaration

func SparseConvertFromCoordinate(_ rowCount: Int32, _ columnCount: Int32, _ blockCount: Int, _ blockSize: UInt8, _ attributes: SparseAttributes_t, _ row: UnsafePointer<Int32>, _ column: UnsafePointer<Int32>, _ data: UnsafePointer<Double>) -> SparseMatrix_Double

Parameters

rowCount

Number of rows in the structure.

columnCount

Number of columns in the structure.

blockCount

Number of blocks in the matrix.

blockSize

Block size for data storage on both input and output.

attributes

Attributes of the matrix to create. The matrix will be forced to conform to the specified attributes by copying or dropping elements as needed.

row

Row indices of the matrix structure.

column

Column indices of the matrix structure.

data

Contents of the structurally nonzero (block) matrix elements.

Return Value

A new SparseMatrix_Double object. When you are done with this matrix, release the memory that has been allocated by calling SparseCleanup(_:) on it.

Discussion

Out-of-range entries are dropped and duplicate entries are summed.

For symmetric matrices, entries are accepted in either triangle. If they are in the "wrong" triangle, as specified by triangle, they are transposed. If an entry is already present, they are treated as duplicates and summed.

For triangular matrices, entries in the "wrong" triangle as specified by triangle are treated as out-of-range and are dropped.

See Also

Support for Coordinate Format Arrays

Creating a Sparse Matrix from Coordinate Format Arrays

Use separate coordinate format arrays to create sparse matrices.

func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributes_t, UnsafePointer<Int32>, UnsafePointer<Int32>, UnsafePointer<Float>) -> SparseMatrix_Float

Returns a sparse matrix of single-precision, floating-point values created from the individual coordinate format arrays.

func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributes_t, UnsafePointer<Int32>, UnsafePointer<Int32>, UnsafePointer<Double>, UnsafeMutableRawPointer, UnsafeMutableRawPointer) -> SparseMatrix_Double

Returns a sparse matrix of double-precision, floating-point values created from the individual coordinate format arrays, without any internal memory allocations.

func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributes_t, UnsafePointer<Int32>, UnsafePointer<Int32>, UnsafePointer<Float>, UnsafeMutableRawPointer, UnsafeMutableRawPointer) -> SparseMatrix_Float

Returns a sparse matrix of single-precision, floating-point values created from the individual coordinate format arrays, without any internal memory allocations.