mutable/vector Design
Responsibilities
- Provide an execution-oriented
Vector[T]backed byArray[T]. - Support direct indexed reads and writes for workloads that need in-place updates.
- Keep non-
inplacealgebraic helpers available for value-producing transforms. - Keep scalar-reducing and aggregate helpers such as
dot()in the mutable package.
Invariants
*_inplacemethods mutate the existing vector and returnUnit.map, scale helpers,zip_with, and matrix conversion helpers return new values.- Vector algebra should stay aligned with
@immut.Vectorfor the shared operation subset. - Length-sensitive helpers such as
dot()andlin_comb(...)reject inconsistent inputs explicitly.