VectorView
The vector storages koblas itself defines: DenseVector and SparseVector, and nothing else ever.
Sealed for serialization, exactly as MatrixView is — a snapshot decodes back into the storage it was written from without a consumer registering anything. Take VectorLike instead unless you need the closed set.
The split between the two storages is a backing-storage choice, not a semantic one: dense pays per coordinate, sparse pays per nonzero. Most code iterates via forEachStored to walk only the populated entries, so sparse callers feed sparse vectors without the cost of dense materialisation and dense callers walk every index the same way.
Inheritors
Properties
Functions
aT * b. Dense×dense routes through the active com.eignex.koblas.dense.VectorKernels; a mixed pair walks the sparse side and gathers from the dense one; anything else is read entry by entry.
Visit each stored entry of this as (index, value), in ascending index order for any storage. For DenseVector that's every index in 0 until size; for SparseVector that's the entries present in the parallel index/value arrays (which may include numerical zeros); for any other VectorLike it is every index, read through VectorLike.get.
Read entry at i. O(1) for DenseVector, O(log nnz) for SparseVector, which binary-searches its ascending indices. Use the forEachStored extension when you want to walk the populated entries without per-index lookup cost.
Materialise into a fresh dense DoubleArray. Always allocates; the returned array is independent of any internal storage, so the caller is free to mutate it.