code: public static INDArray computeDistanceMulti(String function,INDArray x,INDArray y,INDArray result) {
          ReduceOp op = (ReduceOp) getOp(function, x, y, result);
          op.setDimensions(1);
          Nd4j.getExecutioner().exec(op);
          return op.z();
      }
docs: Compute the distance between 2 vectors
  given a function name. Valid function names:
  euclidean: euclidean distance
  cosinedistance: cosine distance
  cosine similarity: cosine similarity
  manhattan: manhattan distance
  jaccard: jaccard distance
  hamming: hamming distance
  @param function the function to use (default euclidean distance)
  @param x the first vector
  @param y the second vector
  @return the distance between the 2 vectors given the inputs