for (Pattern p : pPats.getHeap()) {
int[] pints = p.getPattern();
for (Pattern q : qPats.getHeap()) {
int[] qints = q.getPattern();
Pattern pq = new Pattern();
for (int pi = 0; pi < p.length(); pi++)
pq.add(pints[pi], p.support());
for (int qi = 0; qi < q.length(); qi++)
pq.add(qints[qi], q.support());
pats.insert(pq);
}
}
for (Pattern q : qPats.getHeap()) {
Pattern qq = new Pattern();
int[] qints = q.getPattern();
for (int qi = 0; qi < q.length(); qi++)
qq.add(qints[qi], q.support());
pats.insert(qq);
}
return pats;
}