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