numa/numeric

模块 zio.numa.numeric — pure numerical policy · 12 个符号

Pure numerical policy over coordinate vectors and row-major matrices. Tensor kernels live behind the separate generic tensor host interface.

概览

numa-abs

(defn numa-abs [x] …)

(numa-abs x) — absolute value of finite x as a float; rejects NaN/inf.

numa-sum

(defn numa-sum [values] …)

(numa-sum values) — sum of a finite coordinate vector, as a float.

numa-mean

(defn numa-mean [values] …)

(numa-mean values) — arithmetic mean of a finite coordinate vector; shape-error when values is empty.

numa-vector-add

(defn numa-vector-add [a b] …)

(numa-vector-add a b) — element-wise a+b; equal dimensions required, result coordinates checked finite.

numa-vector-sub

(defn numa-vector-sub [a b] …)

(numa-vector-sub a b) — element-wise a-b; equal dimensions required.

numa-vector-scale

(defn numa-vector-scale [a scalar] …)

(numa-vector-scale a scalar) — element-wise a*scalar with a finite scalar; result coordinates checked finite.

numa-vector-dot

(defn numa-vector-dot [a b] …)

(numa-vector-dot a b) — dot product of same-shape finite vectors.

numa-vector-length

(defn numa-vector-length [a] …)

(numa-vector-length a) — Euclidean length, computed via max-abs rescaling to avoid overflow/underflow; 0.0 for a zero vector.

numa-vector-normalize

(defn numa-vector-normalize [a] …)

(numa-vector-normalize a) — a scaled to unit length; a zero vector is returned scaled by 0.0 (all zeros).

numa-matrix-shape

(defn numa-matrix-shape [matrix] …)

(numa-matrix-shape matrix) — validates a row-major matrix (vector of equal-length rows) and returns [rows cols]; errors on ragged rows.

numa-matrix-transpose

(defn numa-matrix-transpose [matrix] …)

(numa-matrix-transpose matrix) — transpose of a validated row-major matrix, as a new vector of row vectors.

numa-matmul

(defn numa-matmul [a b] …)

(numa-matmul a b) — matrix product a·b; errors when inner dimensions differ. Result entries are finite dot products.