cliqueNodes = Lists.newArrayList();
if (docDependent) {
cliqueNodes.add(docNode);
}
for (int j = firstOne; j <= lastOne; j++) {
TermNode termNode = new TermNode(queryTerms[j]);
cliqueNodes.add(termNode);
}
// Get the potential function.
PotentialFunction potential = PotentialFunction.create(env, potentialType, domNode);
c = new CascadeClique(cliqueNodes, potential, parameter, cascadeStage, pruner_and_params);
cliques.add(c);
} else if (!ordered && !singleTerm && !contiguous) {
cliqueNodes = Lists.newArrayList();
if (docDependent) {
cliqueNodes.add(docNode);
}
for (int j = 0; j < binary.length(); j++) {
if (binary.charAt(j) == '1') {
TermNode termNode = new TermNode(queryTerms[j]);
cliqueNodes.add(termNode);
}
}
// Get the potential function.