예제 #1
0
 private void countNodes(CompressedDAWGNode node, HashSet<Integer> nodeIDHashSet) {
   if (node.getOutgoingTransitionsSize() != 0)
     nodeIDHashSet.add(node.getTransitionSetBeginIndex());
   for (CompressedDAWGNode child : node.getOutgoingTransitionsNodes())
     countNodes(child, nodeIDHashSet);
 }
예제 #2
0
 int getMaxLength(CompressedDAWGNode node, int length) {
   int ret = length;
   for (CompressedDAWGNode child : node.getOutgoingTransitionsNodes())
     ret = Math.max(ret, getMaxLength(child, length + 1));
   return ret;
 }