kumulant

Companion

Distance-function helpers.

Functions

squaredL2

fun squaredL2(a: F64VectorView, b: F64VectorView): Double(source)

Squared L2 distance between two vectors of equal size. Sparse-aware: dense/dense walks every index; sparse/dense iterates the sparse side's stored entries and accumulates dense-only contributions via a baseline pass; sparse/sparse iterates the union of stored indices on both sides.