Type Alias Vectorizer<ParamLength, A>

Vectorizer: (
    map_func: NumericMapFunc<ParamLength>,
    write_to: A,
    ...input_arrs: ArrayFixedLength<NumericArray, ParamLength>,
) => void

a Vectorizer is a function that takes in a scalar multivariable math function map_func (consisting of ParamLength number of variables), and applies that scalar function for each input parameters given by input_arrs[:][i], then writes the numeric output to write_to[i].

i.e.: $\forall i \in \left[0, \dots \text{write_to.length} \right), \text{write_to[i]} = \text{map_func}\left( \text{input_arrs[0][i]}, \text{input_arrs[1][i]}, \dots, \text{input_arrs[ParamLength - 1][i]} \right)$

under the hood, these tend to be just plain old for...loop, but the JIT does the clever part of figuring out that they're optimizable.

see vectorize0, ..., vectorize5, and vectorizeN to use the functions that implement this type-signature.

Type Parameters

Type declaration