a scalar multivariable function. example: add_func: NumericMapFunc<2> = (v1: number, v2: number) => v1 + v2
specify which array to write your output data to
Rest
...input_arrs: ArrayFixedLength<NumericArray, ParamLength>a list of ParamLength
number of input arrays to be consumed by map_func
as input
see vectorize0, ..., vectorize5, and vectorizeN to use the functions that implement this
a
Vectorizer
is a function that takes in a scalar multivariable math functionmap_func
(consisting ofParamLength
number of variables)and applies that scalar function for each input parameters given by
input_arrs[:][i]
, then writes the numeric output towrite_to[i]
ie: $\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.