Search in sources :

Example 1 with PreparedExistentialHomomorphism

use of fr.lirmm.graphik.graal.api.homomorphism.PreparedExistentialHomomorphism in project graal by graphik-team.

the class BacktrackIterator method existNegParts.

private boolean existNegParts() throws BacktrackException {
    Substitution s = currentSubstitution(this.vars);
    s.put(initialSubstitution);
    for (PreparedExistentialHomomorphism negPart : this.currentVar().shared.negatedPartsToCheck) {
        try {
            if (negPart.exist(s)) {
                this.data.bj.success();
                return true;
            }
        } catch (HomomorphismException e) {
            throw new BacktrackException("Error while checking anegated part: ", e);
        }
    }
    return false;
}
Also used : HomomorphismException(fr.lirmm.graphik.graal.api.homomorphism.HomomorphismException) Substitution(fr.lirmm.graphik.graal.api.core.Substitution) HashMapSubstitution(fr.lirmm.graphik.graal.core.HashMapSubstitution) PreparedExistentialHomomorphism(fr.lirmm.graphik.graal.api.homomorphism.PreparedExistentialHomomorphism)

Aggregations

Substitution (fr.lirmm.graphik.graal.api.core.Substitution)1 HomomorphismException (fr.lirmm.graphik.graal.api.homomorphism.HomomorphismException)1 PreparedExistentialHomomorphism (fr.lirmm.graphik.graal.api.homomorphism.PreparedExistentialHomomorphism)1 HashMapSubstitution (fr.lirmm.graphik.graal.core.HashMapSubstitution)1