コード例 #1
0
    public UkkonenState(TreeString str) {
      string = str;

      lastE = 0;
      edgesWithE = new LinkedList<TreeEdge>();
      nextPhaseStart = 0;
      nextExtStart = 0;
      matcher = null;
      nextNode = root;
      gammaLength = 0;
      rule2Node = null;

      if (string.getIndex() > 0) {
        matcher = findEdge(root, string, 0, string.length(), false);
        nextPhaseStart = matcher.matchedTo;
        nextExtStart = 0;
        lastE = matcher.matchedTo;

        logger.log(
            Level.FINEST,
            String.format(
                "String %s can start at phase %d (E:%d)",
                string.toString(), nextPhaseStart, lastE));
      } else {
        matcher = new EdgeMatch(string, 0, string.length());
      }

      currentSuffix = new StringSuffix(string, 0);
    }
コード例 #2
0
 public int getStringIndex() {
   return string.getIndex();
 }