koblas

asView

A borrowed view over this whole vector, keeping whatever origin and spacing it already has.

overlaps

Whether these vectors address at least one common buffer entry.

view

fun DenseVector.view(offset: Int, size: Int, stride: Int = 1): StridedVector(source)

A borrowed strided slice, addressed in this vector's logical indices rather than its buffer's positions.

The receiver's own origin and spacing compose with the ones asked for, so a slice of a slice addresses what the outer one addressed. Reading the arguments as buffer positions instead would silently move the window whenever the receiver was itself a view.

Both endpoints must lie within this vector's logical bounds. An empty slice may start at DenseVector.size. A composed stride that cannot be represented as an Int is rejected.