function getDist(type, node, centroid, attributes, mode) {
  var getP = mode === 'kMedoids' ? function (i) {
    return attributes[i](centroid);
  } : function (i) {
    return centroid[i];
  };

  var getQ = function getQ(i) {
    return attributes[i](node);
  };

  return clusteringDistance(type, attributes.length, getP, getQ);
}
function getDist(type, node, centroid, attributes, mode) {
  var getP = mode === 'kMedoids' ? function (i) {
    return attributes[i](centroid);
  } : function (i) {
    return centroid[i];
  };

  var getQ = function getQ(i) {
    return attributes[i](node);
  };

  return clusteringDistance(type, attributes.length, getP, getQ);
}
function getDist ( type , node , centroid , attributes , mode ) { var getP = mode === 'kMedoids' ? function ( i ) { return attributes [ i ] ( centroid ) ; } : function ( i ) { return centroid [ i ] ; } ; var getQ = function getQ ( i ) { return attributes [ i ] ( node ) ; } ; return clusteringDistance ( type , attributes . length , getP , getQ ) ; }
/* eslint-enable
/ * eslint - enable
get dist of node