build/modelscript.umd.js
function updateClusterID(data, centers, clusterID, distance) {
                for (var i = 0; i < data.length; i++) {
                    clusterID[i] = src$5(centers, data[i], {distanceFunction: distance});
                }
                return clusterID;
            }
function updateClusterID(data, centers, clusterID, distance) {
                for (var i = 0; i < data.length; i++) {
                    clusterID[i] = src$5(centers, data[i], {distanceFunction: distance});
                }
                return clusterID;
            }
function updateClusterID ( data , centers , clusterID , distance ) { for ( var i = 0 ; i < data . length ; i ++ ) { clusterID [ i ] = src$5 ( centers , data [ i ] , { distanceFunction : distance } ) ; } return clusterID ; }
Updates the cluster identifier based in the new data
@ignore
@param {Array<Array<Number>>} data - the [x,y,z,...] points to cluster
@param {Array<Array<Number>>} centers - the K centers in format [x,y,z,...]
@param {Array <Number>} clusterID - the cluster identifier for each data dot
@param {Function} distance - Distance function to use between the points
@returns {Array} the cluster identifier for each data dot
Updates the cluster identifier based in the new data