code: @Deprecated
      public static Method getMethod(SimType similarityType) {
          String methodName = null;
          switch (similarityType) {
          case COSINE:
              methodName = "cosineSimilarity";
              break;
          case PEARSON_CORRELATION:
              methodName = "correlation";
              break;
          case EUCLIDEAN:
              methodName = "euclideanSimilarity";
              break;
          case SPEARMAN_RANK_CORRELATION:
              methodName = "spearmanRankCorrelationCoefficient";
              break;
          case JACCARD_INDEX:
              methodName = "jaccardIndex";
              break;
          case AVERAGE_COMMON_FEATURE_RANK:
              methodName = "averageCommonFeatureRank";
              break;
          case LIN:
              methodName = "linSimilarity";
              break;
          case KL_DIVERGENCE:
              methodName = "klDivergence";
              break;
          case KENDALLS_TAU:
              methodName = "kendallsTau";
              break;
          case TANIMOTO_COEFFICIENT:
              methodName = "tanimotoCoefficient";
              break;
  
          default:
              assert false : similarityType;
          }
          Method m = null;
          try { 
              m = Similarity.class.getMethod(methodName,
                             new Class[] {double[].class, double[].class});
          } catch (NoSuchMethodException nsme) {
              // rethrow
              throw new Error(nsme);
          }
  
          return m;
      }
docs: @deprecated The {@link #getSimilarity(SimType,double[],double[])} method
  should be used instead.
  
  Returns the {@link Method} for getting the similarity of two {@code
  double[]} based on the specified similarity type.
  
  @throws Error if a {@link NoSuchMethodException} is thrown