code: public static <T extends Vector> double getSimilarity(
              SimType similarityType, T a, T b) {
          switch (similarityType) {
              case COSINE:
                  return cosineSimilarity(a, b);
              case PEARSON_CORRELATION:
                  return correlation(a, b);
              case EUCLIDEAN:
                  return euclideanSimilarity(a, b);
              case SPEARMAN_RANK_CORRELATION:
                  return spearmanRankCorrelationCoefficient(a, b);
              case JACCARD_INDEX:
                  return jaccardIndex(a, b);
              case AVERAGE_COMMON_FEATURE_RANK:
                  return averageCommonFeatureRank(a, b);
              case LIN:
                  return linSimilarity(a, b);
              case KL_DIVERGENCE:
                  return klDivergence(a, b);
              case KENDALLS_TAU:
                  return kendallsTau(a, b);
              case TANIMOTO_COEFFICIENT:
                  return tanimotoCoefficient(a, b);
          }
          return 0;
      }
docs: Calculates the similarity of the two vectors using the provided
  similarity measure.
  
  @param similarityType the similarity evaluation to use when comparing
  {@code a} and {@code b}
  @param a a {@code Vector}
  @param b a {@code Vector}
  
  @return the similarity according to the specified measure