public OutgoingTransitionsMap(CompressedDAWGNode cparent, boolean desc) { this.cparent = cparent; this.desc = desc; from = cparent.getTransitionSetBeginIndex(); to = from + (cparent.getOutgoingTransitionsSize() - 1) * transitionSizeInInts; fromChars = cparent.getIndex() + 1; toChars = cparent.getIndex() + transitionSizeInInts - 1; }
@Override public boolean isEmpty() { return cparent.getOutgoingTransitionsSize() == 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); }