koblas

column

Column j as a fresh vector, copied rather than viewed.


Column j as a fresh sparse vector. Runs in O(nnzⱼ) time and allocates copies of its stored indices and values, so later mutations to the returned vector's indices or values cannot affect this matrix. Explicitly stored zeros are preserved.

row

Row i as a fresh vector, gathered across the backing. Prefer column where the algorithm allows.


Row i as a fresh sparse vector whose stored positions are the source columns. Runs in O(nnz) time, scanning every stored entry in the matrix to gather the ones in this row, and allocates arrays sized to its stored entries. The returned vector is independent of this matrix, and explicitly stored zeros are preserved.

Extracting every row this way costs O(nnz * rows); use transpose once and read its columns instead when the algorithm needs many rows.

transpose

Fresh transposed matrix, with the active backend (koblas). For products, prefer the transpose flags on gemv and gemm, which read the original storage without copying. See DenseBlas.transpose.


Fresh transposed matrix, still CSC, which makes this the CSC-to-CSR conversion as well, with the active backend (koblas).

withColumn

Fresh matrix with column column replaced by entering, still CSC. The replacement is structural, so an explicitly stored zero in entering survives as one.