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). Direct constructors are restricted to keep the mutable backing array out of caller hands; DenseVector is intended to be effectively immutable after the factory call, even though internal kumulant code may mutate it for in-place updates.
Types
Factory entrypoints for DenseVector.
Properties
Functions
Read entry at i. O(1) for DenseVector, O(nnz) linear scan for SparseVector. Use the internal 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.
DenseVector
equals
get
Read entry at i. O(1) for DenseVector, O(nnz) linear scan for SparseVector. Use the internal forEachStored extension when you want to walk the populated entries without per-index lookup cost.
hashCode
size
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.