use of fr.lirmm.graphik.graal.homomorphism.utils.HomomorphismIteratorChecker in project graal by graphik-team.
the class NoForwardChecking method getCandidatsIterator.
@Override
public CloseableIterator<Term> getCandidatsIterator(AtomSet g, Var var, Substitution initialSubstitution, Map<Variable, Integer> map, Var[] varData, RulesCompilation rc) throws BacktrackException {
HomomorphismIteratorChecker tmp;
try {
tmp = new HomomorphismIteratorChecker(var, g.termsIterator(), var.shared.preAtoms, g, initialSubstitution, map, varData, rc);
} catch (AtomSetException e) {
throw new BacktrackException(e);
}
tmp.setProfiler(this.getProfiler());
return tmp;
}
use of fr.lirmm.graphik.graal.homomorphism.utils.HomomorphismIteratorChecker in project graal by graphik-team.
the class AbstractNFC method getCandidatsIterator.
@Override
public CloseableIterator<Term> getCandidatsIterator(AtomSet g, Var var, Substitution initialSubstitution, Map<Variable, Integer> map, Var[] varData, RulesCompilation rc) throws BacktrackException {
HomomorphismIteratorChecker tmp;
if (this.data[var.shared.level].last.init) {
tmp = new HomomorphismIteratorChecker(var, new CloseableIteratorAdapter<Term>(this.data[var.shared.level].last.candidats.iterator()), this.data[var.shared.level].toCheckAfterAssignment, g, initialSubstitution, map, varData, rc);
} else {
try {
tmp = new HomomorphismIteratorChecker(var, g.termsIterator(), var.shared.preAtoms, g, initialSubstitution, map, varData, rc);
} catch (AtomSetException e) {
throw new BacktrackException(e);
}
}
tmp.setProfiler(this.getProfiler());
return tmp;
}
use of fr.lirmm.graphik.graal.homomorphism.utils.HomomorphismIteratorChecker in project graal by graphik-team.
the class NFC2WithLimit method getCandidatsIterator.
@Override
public CloseableIterator<Term> getCandidatsIterator(AtomSet g, Var var, Substitution initialSubstitution, Map<Variable, Integer> map, Var[] varData, RulesCompilation rc) throws BacktrackException {
HomomorphismIteratorChecker tmp;
if (this.data[var.shared.level].last.init) {
this.dataWithLimit[var.shared.level].atomsToCheck.addAll(this.data[var.shared.level].toCheckAfterAssignment);
tmp = new HomomorphismIteratorChecker(var, new CloseableIteratorAdapter<Term>(this.data[var.shared.level].last.candidats.iterator()), this.dataWithLimit[var.shared.level].atomsToCheck, g, initialSubstitution, map, varData, rc);
} else {
try {
tmp = new HomomorphismIteratorChecker(var, g.termsIterator(), var.shared.preAtoms, g, initialSubstitution, map, varData, rc);
} catch (AtomSetException e) {
throw new BacktrackException(e);
}
}
tmp.setProfiler(this.getProfiler());
return tmp;
}
use of fr.lirmm.graphik.graal.homomorphism.utils.HomomorphismIteratorChecker in project graal by graphik-team.
the class SimpleFC method getCandidatsIterator.
@Override
public CloseableIterator<Term> getCandidatsIterator(AtomSet g, Var var, Substitution initialSubstitution, Map<Variable, Integer> map, Var[] varData, RulesCompilation rc) throws BacktrackException {
HomomorphismIteratorChecker tmp;
try {
tmp = new HomomorphismIteratorChecker(var, g.termsIterator(), var.shared.preAtoms, g, initialSubstitution, map, varData, rc);
} catch (AtomSetException e) {
throw new BacktrackException(e);
}
tmp.setProfiler(this.getProfiler());
return tmp;
}
Aggregations