コード例 #1
0
  /*
   * createGST and gstMATCH
   *
   * Methods to implement the GST-TILING methodology of matching strings.
   */
  private GST createGST(int needleLength, String haystack) {
    GST gst = new GST(haystack);
    // Needs to be at least a third of the needle length to
    // count as a match
    gst.setMinimumTileLength((int) Math.ceil(needleLength / 3));

    return gst;
  }