import type { array, matrix } from "../types"; /** * Subtraction X - Y. * * Subtracts two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices. * * @param x The first operand, can be a number, array, or matrix. * @param y The second operand, can be a number, array, or matrix. * @returns The result of subtracting `y` from `x`. * @throws If the input dimensions do not agree or if no arguments are provided. * * @example Subtract two numbers * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus(5, 3), 2); * * ``` * * @example Subtract two arrays element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([5, 6, 4], [3, 1, 2]), [2, 5, 2]); * * ``` * * @example Subtract a number from each element of an array * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([15, 16, 14], 10), [5, 6, 4]); * * ``` * * @example Subtract a number from each element of a matrix * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[15, 16], [13, 14]], 10), [[5, 6], [3, 4]]); * * ``` * * @example Subtract two matrices element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[7, 9], [4, 6]], [[2, 3], [1, 2]]), [[5, 6], [3, 4]]); * ``` */ export default function minus(x: number, y: number): number; /** * Subtraction X - Y. * * Subtracts two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices. * * @param x The first operand, can be a number, array, or matrix. * @param y The second operand, can be a number, array, or matrix. * @returns The result of subtracting `y` from `x`. * @throws If the input dimensions do not agree or if no arguments are provided. * * @example Subtract two numbers * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus(5, 3), 2); * * ``` * * @example Subtract two arrays element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([5, 6, 4], [3, 1, 2]), [2, 5, 2]); * * ``` * * @example Subtract a number from each element of an array * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([15, 16, 14], 10), [5, 6, 4]); * * ``` * * @example Subtract a number from each element of a matrix * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[15, 16], [13, 14]], 10), [[5, 6], [3, 4]]); * * ``` * * @example Subtract two matrices element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[7, 9], [4, 6]], [[2, 3], [1, 2]]), [[5, 6], [3, 4]]); * ``` */ export default function minus(x: number, y: array): array; /** * Subtraction X - Y. * * Subtracts two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices. * * @param x The first operand, can be a number, array, or matrix. * @param y The second operand, can be a number, array, or matrix. * @returns The result of subtracting `y` from `x`. * @throws If the input dimensions do not agree or if no arguments are provided. * * @example Subtract two numbers * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus(5, 3), 2); * * ``` * * @example Subtract two arrays element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([5, 6, 4], [3, 1, 2]), [2, 5, 2]); * * ``` * * @example Subtract a number from each element of an array * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([15, 16, 14], 10), [5, 6, 4]); * * ``` * * @example Subtract a number from each element of a matrix * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[15, 16], [13, 14]], 10), [[5, 6], [3, 4]]); * * ``` * * @example Subtract two matrices element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[7, 9], [4, 6]], [[2, 3], [1, 2]]), [[5, 6], [3, 4]]); * ``` */ export default function minus(x: array, y: number): array; /** * Subtraction X - Y. * * Subtracts two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices. * * @param x The first operand, can be a number, array, or matrix. * @param y The second operand, can be a number, array, or matrix. * @returns The result of subtracting `y` from `x`. * @throws If the input dimensions do not agree or if no arguments are provided. * * @example Subtract two numbers * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus(5, 3), 2); * * ``` * * @example Subtract two arrays element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([5, 6, 4], [3, 1, 2]), [2, 5, 2]); * * ``` * * @example Subtract a number from each element of an array * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([15, 16, 14], 10), [5, 6, 4]); * * ``` * * @example Subtract a number from each element of a matrix * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[15, 16], [13, 14]], 10), [[5, 6], [3, 4]]); * * ``` * * @example Subtract two matrices element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[7, 9], [4, 6]], [[2, 3], [1, 2]]), [[5, 6], [3, 4]]); * ``` */ export default function minus(x: array, y: array): array; /** * Subtraction X - Y. * * Subtracts two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices. * * @param x The first operand, can be a number, array, or matrix. * @param y The second operand, can be a number, array, or matrix. * @returns The result of subtracting `y` from `x`. * @throws If the input dimensions do not agree or if no arguments are provided. * * @example Subtract two numbers * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus(5, 3), 2); * * ``` * * @example Subtract two arrays element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([5, 6, 4], [3, 1, 2]), [2, 5, 2]); * * ``` * * @example Subtract a number from each element of an array * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([15, 16, 14], 10), [5, 6, 4]); * * ``` * * @example Subtract a number from each element of a matrix * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[15, 16], [13, 14]], 10), [[5, 6], [3, 4]]); * * ``` * * @example Subtract two matrices element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[7, 9], [4, 6]], [[2, 3], [1, 2]]), [[5, 6], [3, 4]]); * ``` */ export default function minus(x: number, y: matrix): matrix; /** * Subtraction X - Y. * * Subtracts two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices. * * @param x The first operand, can be a number, array, or matrix. * @param y The second operand, can be a number, array, or matrix. * @returns The result of subtracting `y` from `x`. * @throws If the input dimensions do not agree or if no arguments are provided. * * @example Subtract two numbers * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus(5, 3), 2); * * ``` * * @example Subtract two arrays element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([5, 6, 4], [3, 1, 2]), [2, 5, 2]); * * ``` * * @example Subtract a number from each element of an array * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([15, 16, 14], 10), [5, 6, 4]); * * ``` * * @example Subtract a number from each element of a matrix * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[15, 16], [13, 14]], 10), [[5, 6], [3, 4]]); * * ``` * * @example Subtract two matrices element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[7, 9], [4, 6]], [[2, 3], [1, 2]]), [[5, 6], [3, 4]]); * ``` */ export default function minus(x: matrix, y: number): matrix; /** * Subtraction X - Y. * * Subtracts two numbers, arrays, or matrices element-wise. Handles mixed inputs of scalars, arrays, and matrices. * * @param x The first operand, can be a number, array, or matrix. * @param y The second operand, can be a number, array, or matrix. * @returns The result of subtracting `y` from `x`. * @throws If the input dimensions do not agree or if no arguments are provided. * * @example Subtract two numbers * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus(5, 3), 2); * * ``` * * @example Subtract two arrays element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([5, 6, 4], [3, 1, 2]), [2, 5, 2]); * * ``` * * @example Subtract a number from each element of an array * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([15, 16, 14], 10), [5, 6, 4]); * * ``` * * @example Subtract a number from each element of a matrix * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[15, 16], [13, 14]], 10), [[5, 6], [3, 4]]); * * ``` * * @example Subtract two matrices element-wise * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(minus([[7, 9], [4, 6]], [[2, 3], [1, 2]]), [[5, 6], [3, 4]]); * ``` */ export default function minus(x: matrix, y: matrix): matrix; //# sourceMappingURL=minus.d.ts.map