linalg/sized
statically-sized float vectors and matrices (Track C / U4).
LaVecN
(LaVecN [n] :int))
lavecn-zeros
(lavecn-zeros [n])
a fresh length-k vector of zeros. The static length is
lavecn-free
(lavecn-free [n])
free a vector and its backing buffer.
lavecn-len
(lavecn-len [n])
runtime element count (equals the static `n`).
lavecn-get
(lavecn-get [n])
bounds-checked element read at index i.
lavecn-set!
(lavecn-set! [n])
bounds-checked element write at index i.
lavecn-dot
(lavecn-dot [n])
dot product. Both operands share `n`, so a length mismatch
lavecn-add
(lavecn-add [n])
element-wise sum (shared `n`); returns a fresh vector.
lavecn-sub
(lavecn-sub [n])
element-wise difference (shared `n`); returns a fresh vector.
lavecn-scale
(lavecn-scale [n])
multiply every element by s; returns a fresh vector.
lavecn-norm
(lavecn-norm [n])
Euclidean (L2) norm.
LaMatN
(LaMatN [m n] :int))
lamat-zeros
(lamat-zeros [m n])
a fresh r x c matrix of zeros; the static shape is pinned
lamat-free
(lamat-free [m n])
free a matrix and its backing buffer.
lamat-rows
(lamat-rows [m n])
runtime shape (equal to the static m / n).
lamat-cols
(lamat-cols [m n])
lamat-get
(lamat-get [m n])
bounds-checked element access at (i, j).
lamat-set!
(lamat-set! [m n])
lamat-add
(lamat-add [m n])
element-wise; both operands share shape (m, n).
lamat-sub
(lamat-sub [m n])
lamat-scale
(lamat-scale [m n])
multiply every element by s.
lamat-mul
(lamat-mul [m k n])
matrix product: (m x k) * (k x n) -> (m x n). The inner
lamat-transpose
(lamat-transpose [m n])
(m x n) -> (n x m).
Internal definitions
__lavecn-new-zeroed-raw__lavecn-free-raw__lavecn-len-raw__lavecn-get-raw__lavecn-set-raw__lavecn-dot-raw__lavecn-zip-raw__lavecn-scale-raw__lavecn-norm-raw__lamat-new-zeroed-raw__lamat-free-raw__lamat-rows-raw__lamat-cols-raw__lamat-get-raw__lamat-set-raw__lamat-zip-raw__lamat-scale-raw__lamat-mul-raw__lamat-transpose-raw