sparse_extract_sparse_row_float(_:_:_:_:_:_:_:)
Extracts values from a specified row of a single-precision sparse matrix.
Declaration
func sparse_extract_sparse_row_float(_ A: sparse_matrix_float!, _ row: sparse_index, _ column_start: sparse_index, _ column_end: UnsafeMutablePointer<sparse_index>!, _ nz: sparse_dimension, _ val: UnsafeMutablePointer<Float>!, _ jndx: UnsafeMutablePointer<sparse_index>!) -> sparse_statusParameters
- A:
The sparse matrix, A, which must have been created with Sparse_matrix_create_float(_:_:). Sparse_illegal_parameter is returned if not met.
- row:
The row for value extraction.
- column_start:
The index of the column to start extraction.
- column_end:
On return, holds the column index of the next nonzero value.
- nz:
The number of values to extract from
A. Each ofjndxandvalare of sizenz. - val:
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
rowandjndx. Must be of sizenzelements. If less thannznonzero values are found, then the lastnz - actual_nonzero_countelements of val are untouched. - jndx:
An array to hold the extracted column indices that correspond to the values in
val. Note that these indices are relative to the matrix row and not the starting column index specified bycolumn_start. Returned indices are 0 based (first element of pointer isptr[0]). Must be of sizenzelements.
Return Value
On success val and jndx have been updated with the nonzero values of the row’th row, column_end holds the column 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.
Discussion
Extract the first nz values of the row beginning at A[row,column_start] for the sparse matrix A. The number of nonzero values extracted is limited by nz, and the number of nonzero’s written to jndx and val are returned. Additionally, the column index of the next nonzero value is returned in column_end. For example if nz is returned, not all nonzero values have been extracted, and a second extract can start from column_end.
See Also
Value extraction
sparse_extract_sparse_row_double(_:_:_:_:_:_:_:)sparse_extract_sparse_column_double(_:_:_:_:_:_:_:)sparse_extract_sparse_column_float(_:_:_:_:_:_:_:)sparse_extract_sparse_column_double_complex(_:_:_:_:_:_:_:)sparse_extract_sparse_column_float_complex(_:_:_:_:_:_:_:)sparse_extract_sparse_row_float_complex(_:_:_:_:_:_:_:)sparse_extract_sparse_row_double_complex(_:_:_:_:_:_:_:)