/** * Element-wise addition. * - If `b` is a number, returns `a + b` for each element. * - If `b` is an array, returns element-wise sum up to the shorter length. * @param a Left operand array * @param b Right operand array or scalar * @returns Float64Array of sums */ export declare function add(a: ArrayLike, b: ArrayLike | number): Float64Array; /** * Element-wise subtraction. * - If `b` is a number, returns `a - b` for each element. * - If `b` is an array, returns element-wise difference up to the shorter length. * @param a Left operand array * @param b Right operand array or scalar * @returns Float64Array of differences */ export declare function sub(a: ArrayLike, b: ArrayLike | number): Float64Array; /** * Element-wise multiplication. * - If `b` is a number, scales each element of `a` by `b`. * - If `b` is an array, returns element-wise products up to the shorter length. * @param a Left operand array * @param b Right operand array or scalar * @returns Float64Array of products */ export declare function mul(a: ArrayLike, b: ArrayLike | number): Float64Array; /** * Element-wise division. * - If `b` is a number, divides each element of `a` by `b`. * - If `b` is an array, returns element-wise quotients up to the shorter length. * @param a Numerator array * @param b Denominator array or scalar * @returns Float64Array of quotients */ export declare function div(a: ArrayLike, b: ArrayLike | number): Float64Array; /** * Element-wise average: (a + b) / 2. * Computes the average without allocating temporaries. * @param a First array * @param b Second array or scalar * @returns Float64Array of averages */ export declare function avg(a: ArrayLike, b: ArrayLike | number): Float64Array; /** * Scale an array by a scalar: `source * s`. * @param source Input array * @param s Scale factor * @returns Float64Array scaled values */ export declare function scale(source: ArrayLike, s: number): Float64Array; /** * Clamp values to the inclusive range [lo, hi]. Preserves NaN entries. * @param source Input array * @param lo Lower bound * @param hi Upper bound * @returns Float64Array with values clamped or NaN preserved */ export declare function clamp(source: ArrayLike, lo: number, hi: number): Float64Array; /** * Element-wise absolute value. * @param source Input array * @returns Float64Array of absolute values */ export declare function abs(source: ArrayLike): Float64Array; /** * Element-wise sign (-1, 0, 1) for each entry. * @param source Input array * @returns Float64Array of sign values */ export declare function sign(source: ArrayLike): Float64Array; /** * Round values to nearest integer. Ties are rounded away from zero. * @param source Input array * @returns Float64Array of rounded integers */ export declare function round(source: ArrayLike): Float64Array; /** * Element-wise floor operation. * @param source Input array * @returns Float64Array of floored values */ export declare function floor(source: ArrayLike): Float64Array; /** * Element-wise ceil operation. * @param source Input array * @returns Float64Array of ceiled values */ export declare function ceil(source: ArrayLike): Float64Array; /** * First difference: output[i] = source[i] - source[i-1]. * The first element is NaN (no previous value). * @param source Input array * @returns Float64Array of differences (first element NaN) */ export declare function diff(source: ArrayLike): Float64Array; /** * Map a callback across `source` producing a new Float64Array. * @param source Input array * @param cb Mapping callback `(value, index, array) => number` * @returns Float64Array of mapped values */ export declare function apply(source: ArrayLike, cb: (v: number, i: number, arr: ArrayLike) => number): Float64Array; /** * Apply a callback to each element in `source` in-place. * Modifies the provided array. * @param source Mutable array to update * @param cb Callback `(value, index) => newValue` */ export declare function applyInPlace(source: number[] | Float64Array, cb: (value: number, index: number) => number): void; /** * Element-wise less-than comparison. Returns `Uint8Array` mask with 1 where true. * @param a Left operand * @param b Right operand or scalar * @returns Uint8Array mask of comparisons */ export declare function lt(a: ArrayLike, b: ArrayLike | number): Uint8Array; /** * Element-wise less-than-or-equal comparison (with epsilon tolerance). * @param a Left operand * @param b Right operand or scalar * @returns Uint8Array mask of comparisons */ export declare function lte(a: ArrayLike, b: ArrayLike | number): Uint8Array; /** * Element-wise greater-than comparison. Returns `Uint8Array` mask with 1 where true. * @param a Left operand * @param b Right operand or scalar * @returns Uint8Array mask of comparisons */ export declare function gt(a: ArrayLike, b: ArrayLike | number): Uint8Array; /** * Element-wise greater-than-or-equal comparison (with epsilon tolerance). * @param a Left operand * @param b Right operand or scalar * @returns Uint8Array mask of comparisons */ export declare function gte(a: ArrayLike, b: ArrayLike | number): Uint8Array; /** * Element-wise equality comparison using `Number.EPSILON` tolerance. * @param a Left operand * @param b Right operand or scalar * @returns Uint8Array mask of equality tests */ export declare function eq(a: ArrayLike, b: ArrayLike | number): Uint8Array; /** * Element-wise inequality comparison. * @param a Left operand * @param b Right operand or scalar * @returns Uint8Array mask where elements are not equal */ export declare function neq(a: ArrayLike, b: ArrayLike | number): Uint8Array; /** * Logical AND for boolean masks (Uint8Array) or with a scalar. * Returns a Uint8Array of 1/0 values. * @param a Left boolean mask * @param b Right boolean mask or scalar * @returns Uint8Array mask result */ export declare function and(a: Uint8Array, b: Uint8Array | number): Uint8Array; /** * Logical OR for boolean masks (Uint8Array) or with a scalar. * Returns a Uint8Array of 1/0 values. * @param a Left boolean mask * @param b Right boolean mask or scalar * @returns Uint8Array mask result */ export declare function or(a: Uint8Array, b: Uint8Array | number): Uint8Array; /** * Logical NOT for a boolean mask (Uint8Array). * @param a Input boolean mask * @returns Uint8Array mask with bits inverted */ export declare function not(a: Uint8Array): Uint8Array;