for (WeightedValue<Resource> v2 : resultMatrix.getRow(v.value).normalize().toSortedArray()) {
if (++j > maxJustifications) {
break;
}
NodeSet ns = new NodeSet(v2.value, (float) v2.weight, new AssumptionStep(context), context);
// FIXME: these will be in reverse order of weight, which is counterintuitive
nsList = new NodeSetList(ns, nsList, context);
}
InferenceStep infStep = new InferenceStep(rule, nsList, context);
NodeSet ns = new NodeSet(v.value, (float) v.weight, infStep, context);
answers.add(ns);
}
Information info = new Information(queryRawString, context);
Query query = new Query(info, answers, context);