linearCombination MethodStatic

Compute the linear combination s of the numbers and scales.

linearCombination(data: number[], scales: number[]): number

@returns s = sum(d_i * s_i), where i ranges from 0 to min(data.length, scales.length).

Parameter Type Description
data number[] array of numbers d_i.
scales number[] array of scales s_i. For best results, scales should have the same length as data.

Returns - number

s = sum(d_i * s_i), where i ranges from 0 to min(data.length, scales.length).

Defined in

Last Updated: 21 November, 2024