import type { array } from "../types"; /** * Pairwise distance between two sets of observations. * * Computes various distance metrics between two arrays including * Euclidean, Manhattan, Chebyshev, and Hamming distances. * * @param x First input array * @param y Second input array * @param mode Distance method ('euclidean', 'manhattan', 'chebychev', 'hamming'). Default is 'euclidean' * @returns Distance value * @throws When arrays have different lengths or invalid method specified * * @example Euclidean distance * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(pdist([0, 0], [3, 4], 'euclidean'), 5); * * ``` * * @example Manhattan distance * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(pdist([1, 1], [4, 5], 'manhattan'), 7); * * ``` * * @example Chebyshev distance * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(pdist([1, 2], [4, 6], 'chebychev'), 4); * ``` */ export default function pdist(x: array, y: array, mode?: "euclidean" | "manhattan" | "chebychev" | "hamming"): number; //# sourceMappingURL=pdist.d.ts.map