info.scce.addlib.traverser.PreorderTraverser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of addlib Show documentation
Show all versions of addlib Show documentation
The Java Library for Algebraic Decision Diagrams, Code Generation, and Layouting
package info.scce.addlib.traverser;
import info.scce.addlib.dd.DD;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
public class PreorderTraverser> implements Iterable {
private final List roots;
public PreorderTraverser(D root) {
this(Collections.singletonList(root));
}
public PreorderTraverser(List roots) {
this.roots = roots;
}
@Override
public Iterator iterator() {
return new PreorderIterator<>(roots);
}
}