private final IntervalSet<BinaryInterval> lptMaximalSet;
private final Map<Context, Map<Interval, Integer>> envMap = new TreeMap<Context, Map<Interval, Integer>>();
private final boolean maximalOnly;
public NestedMaximalityContextExtractor(Corpus<S> corpus, boolean maximalOnly) {
this.lst = new LinearizedSuffixTreeImpl(corpus.sequence(), corpus.alphabetSize());
this.lpt = new LinearizedSuffixTreeImpl(corpus.sequence().reverse(), corpus.alphabetSize());
lstMaximalSet = new LocalMaximumSetBuilder().buildIntervalSet(lst);
lstBwtSet = new SingletonBwtSetBuilder().buildIntervalSet(lst);
lptMaximalSet = new LocalMaximumSetBuilder().buildIntervalSet(lpt);
this.maximalOnly = maximalOnly;
traverseLeft(lst.top(), 0, new HashSet<Interval>());