Extracts values from a specified column of a single-precision sparse matrix.


func sparse_extract_sparse_column_float(_ A: sparse_matrix_float!, _ column: sparse_index, _ row_start: sparse_index, _ row_end: UnsafeMutablePointer<sparse_index>!, _ nz: sparse_dimension, _ val: UnsafeMutablePointer<Float>!, _ indx: UnsafeMutablePointer<sparse_index>!) -> sparse_status



The sparse matrix, A, which must have been created with sparse_matrix_create_float(_:_:). SPARSE_ILLEGAL_PARAMETER is returned if not met.


The column for value extraction.


The index of the row to start extraction.


On return, holds the row index of the next nonzero value.


The number of values to extract from A. Each of jndx and val are of size nz.


Pointer to array to hold the values extracted from the sparse matrix. The value is extracted from the location specified by the corresponding indices of column and jndx. Must be of size nz elements. If less than nz nonzero values are found, then the last nz - actual_nonzero_count elements of val are untouched.


An array to hold the extracted row indices that correspond to the values in val. Note that these indices are relative to the matrix column and not the starting row index specified by row_start. Returned indices are 0 based (first element of pointer is ptr[0]). Must be of size nz elements.

Return Value

On success val and jndx have been updated with the nonzero values of the column'th row, row_end holds the row index of the next nonzero value, and the number of nonzero values written are returned. If A creation requirements are not met, SPARSE_ILLEGAL_PARAMETER is returned and val and jndx are unchanged.


Extract the first nz values of the column beginning at A[column,row_start] for the sparse matrix A. The number of nonzero values extracted is limited by nz, and the number of nonzero's written to indx and val are returned. Additionally, the row index of the next nonzero value is returned in row_end. For example if nz is returned, not all nonzero values have been extracted, and a second extract can start from row_end.