use of at.ac.tuwien.kr.alpha.core.atoms.Literals in project Alpha by alpha-asp.
the class HeuristicTestUtils method addNoGoods.
static void addNoGoods(AtomStore atomStore, WritableAssignment assignment, NoGoodStoreAlphaRoaming noGoodStore, VSIDS vsids, NoGood... noGoods) {
int numberOfAtoms = Arrays.stream(noGoods).flatMapToInt(NoGood::stream).map(Literals::atomOf).max().getAsInt();
TestUtils.fillAtomStore(atomStore, numberOfAtoms);
assignment.growForMaxAtomId();
noGoodStore.growForMaxAtomId(numberOfAtoms);
vsids.growForMaxAtomId(numberOfAtoms);
Collection<NoGood> setOfNoGoods = new HashSet<>();
int noGoodId = 1;
for (NoGood noGood : noGoods) {
setOfNoGoods.add(noGood);
noGoodStore.add(noGoodId++, noGood);
}
vsids.heapOfActiveAtoms.newNoGoods(setOfNoGoods);
}