Returns a single-precision sparse matrix object.


func sparse_matrix_create_float(_ M: sparse_dimension, _ N: sparse_dimension) -> sparse_matrix_float!



The number of rows of the matrix. Must be greater than 0.


The number of columns of the matrix. Must be greater than 0.

Return Value

A matrix object that is ready for receiving entries. If an error occurs, nil is returned.


This function creates a sparse matrix object that is stored in point-wise format and is ready to receive values from the various insert routines. Point-wise format means individual values are stored for a given i,j location as opposed to blocks of values. For block support use the block create routines. See the various insert routines for details on inserting entries into this matrix object.

After you've finished with the matrix, it's important that you free the memory allocated to it with sparse_matrix_destroy(_:).

See Also

Matrix Creation and Population