info.scce.addlib.traverser.PreorderTreeTraverser 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 PreorderTreeTraverser> implements Iterable {
private final List roots;
public PreorderTreeTraverser(D root) {
this(Collections.singletonList(root));
}
public PreorderTreeTraverser(List roots) {
this.roots = roots;
}
@Override
public Iterator iterator() {
return new PreorderTreeIterator<>(roots);
}
}