StatusUpdater updater) {
long currentAttributeCount = tree.headerCount(currentAttribute);
if (currentAttributeCount < minSupportMutable.longValue()) {
return new FrequentPatternMaxHeap(k, true);
}
FPTree condTree = tree.createMoreFreqConditionalTree(currentAttribute);
Pair<FPTree, FPTree> pAndQ = condTree.splitSinglePrefix();
FPTree p = pAndQ.getFirst();
FPTree q = pAndQ.getSecond();
FrequentPatternMaxHeap prefixPats = null;
if (p != null) {
prefixPats = mineSinglePrefix(p, k);
}
FrequentPatternMaxHeap suffixPats = new FrequentPatternMaxHeap(k, true);
Pattern thisPat = new Pattern();
thisPat.add(currentAttribute, currentAttributeCount);
suffixPats.insert(thisPat);
for (int attr : q.attrIterableRev()) {
mergeHeap(suffixPats,
growth(q, minSupportMutable, k, attr, updater),
currentAttribute,
currentAttributeCount, true);
}
if (prefixPats != null) {
FrequentPatternMaxHeap toRet = cross(prefixPats, suffixPats, k);
return toRet;
}
return suffixPats;
}