StridedVector
A mutable live window of size entries in values, starting at offset and separated by stride.
The stepped shape of DenseVector: every entry is stored, so a vendor addresses it as a pointer and an increment exactly as it does a contiguous one. Negative stride is supported when both ends remain in the buffer. This shape always borrows values rather than copying it, so mutations through it or through any other reference to the array are visible to each other.
Constructors
StridedVector
Functions
get
set
toDoubleArray
Materialise into a fresh dense DoubleArray, independent of the internal storage.
toString
A borrowed view over this whole vector, keeping whatever origin and spacing it already has.
y = y + alpha * x. A sparse x touches only the positions it stores. A dense x with an identical mapping is read directly; other dense overlaps, or sparse values sharing the destination buffer, are snapshotted before writing. Custom Vector implementations are also snapshotted, since their backing storage is opaque.
Visit each stored entry as (index, value), in ascending index order for any storage. A SparseVector may present numerical zeros as stored, and any other Vector has every index visited.
Zero-based logical index of the maximum absolute value (BLAS idamax), or -1 when empty. Dense vectors use DenseVectorKernels.iamax; sparse vectors visit only their stored entries. All-zero nonempty inputs return 0, as do sparse inputs whose maximum is an implicit zero. Strided views report their logical index rather than a backing-array offset.
a - b, allocating. axpy with alpha = -1.0 accumulates into an existing operand.
Whether these vectors address at least one common buffer entry.
a + b, allocating. axpy accumulates into an existing operand.
v = alpha * v.
alpha * x, allocating. scale multiplies in place.
-x, allocating.
A borrowed strided slice, addressed in this vector's logical indices rather than its buffer's positions.