/** * Calculates the distance matrix for a given array of points * @ignore * @param data - the [x,y,z,...] points to cluster * @param distance - Distance function to use between the points * @returns - matrix with the distance values */ export declare function calculateDistanceMatrix(data: number[][], distance: (a: number[], b: number[]) => number): number[][]; /** * Updates the cluster identifier based in the new data * @ignore * @param data - the [x,y,z,...] points to cluster * @param centers - the K centers in format [x,y,z,...] * @param clusterID - the cluster identifier for each data dot * @param distance - Distance function to use between the points * @returns the cluster identifier for each data dot */ export declare function updateClusterID(data: number[][], centers: number[][], clusterID: number[], distance: (a: number[], b: number[]) => number): number[]; /** * Update the center values based in the new configurations of the clusters * @ignore * @param prevCenters - Centroids from the previous iteration * @param data - the [x,y,z,...] points to cluster * @param clusterID - the cluster identifier for each data dot * @param K - Number of clusters * @returns the K centers in format [x,y,z,...] */ export declare function updateCenters(prevCenters: number[][], data: number[][], clusterID: number[], K: number): number[][]; /** * The centers have moved more than the tolerance value? * @ignore * @param centers - the K centers in format [x,y,z,...] * @param oldCenters - the K old centers in format [x,y,z,...] * @param distanceFunction - Distance function to use between the points * @param tolerance - Allowed distance for the centroids to move * @returns `true` when every center moved less than the tolerance. */ export declare function hasConverged(centers: number[][], oldCenters: number[][], distanceFunction: (a: number[], b: number[]) => number, tolerance: number): boolean; //# sourceMappingURL=utils.d.ts.map