code: function getSimilarity(type, n1, n2, attributes) {
    var attr = function attr(n, i) {
      return attributes[i](n);
    }; // nb negative because similarity should have an inverse relationship to distance
  
  
    return -clusteringDistance(type, attributes.length, function (i) {
      return attr(n1, i);
    }, function (i) {
      return attr(n2, i);
    }, n1, n2);
  }
docs: /* eslint-enable