DenseVector
Dense double-precision vector backed by a flat DoubleArray. The default carrier when the caller already has a dense array or expects most entries to be populated.
Construction goes through the Companion factories: DenseVector.of (copy a DoubleArray) or DenseVector.zero (allocate a zero vector of given size). Unlike the read-only VectorView contract, the concrete vector exposes its data backing and elementwise set for in-place updates.
Constructors
DenseVector
Types
Factory entrypoints for DenseVector.
Functions
equals
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.
hashCode
set
toDoubleArray
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.
toString
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.