SparseMatrix
Compressed-sparse-column form: column j occupies colPointers(j) until colPointers(j + 1) of rowIndices and values, rows strictly ascending. A stored zero is preserved, and a 64-bit-index host library needs a widening copy.
Use copyColumnPointers, copyRowIndices, or forEachInColumn for safe structural access. colPointers and rowIndices are live zero-copy escape hatches for specialized kernels and require UnsafeKoblasApi; mutating them can invalidate the CSC structure. values remains live so coefficients can be updated without rebuilding the pattern; do not use the matrix as a hash-map key while mutating it.
Functions
copyColumnPointers
A copy of the CSC column start offsets, of length cols + 1.
copyRowIndices
A copy of the stored row indices, parallel to values.
equals
forEachInColumn
get
hashCode
toArray
Materialises into a fresh rows × cols array of rows; unstored entries stay zero.
toString
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.
A - B, allocating an owned CSC structural union.
A + B, allocating an owned CSC structural union.
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.
Fresh CSC matrix holding A + alpha * x * xT in its lower or upper triangle. The other triangle is copied unchanged. Unlike dense com.eignex.koblas.dense.DenseBlas.syr, this is not in place: a rank update can introduce entries that the source CSC pattern has no room to store.
Fresh CSC matrix holding A + alpha * (x * yT + y * xT) in its lower or upper triangle. The other triangle is copied unchanged. This structural counterpart of dense com.eignex.koblas.dense.DenseBlas.syr2 never mutates its source, because newly nonzero entries may require CSC fill.
Allocating product through koblas: two sparse operands give CSC storage, any other pairing dense.
A * B for a sparse left operand and dense right operand, allocating dense storage.
A * B for two sparse matrices, allocating the discovered CSC structure.
Fresh transposed matrix, still CSC, which makes this the CSC-to-CSR conversion as well. Explicitly stored zeros survive, since the transpose is structural rather than arithmetic.