Search in sources :

Example 1 with EvalInstance

use of catdata.aql.fdm.EvalInstance in project fql by CategoricalData.

the class Constraints method triggers.

public <X, Y, Gen, Sk> Collection<Pair<ED<Ty, En, Sym, Fk, Att>, Row<WHICH, X>>> triggers(Instance<Ty, En, Sym, Fk, Att, Gen, Sk, X, Y> I, AqlOptions options) {
    Collection<Pair<ED<Ty, En, Sym, Fk, Att>, Row<WHICH, X>>> T = new LinkedList<>();
    for (ED<Ty, En, Sym, Fk, Att> ed : eds) {
        Query<Ty, En, Sym, Fk, Att, WHICH, Unit, Void> Q = ed.Q;
        EvalInstance<Ty, En, Sym, Fk, Att, Gen, Sk, WHICH, Unit, Void, X, Y> QI = new EvalInstance<>(Q, I, options);
        outer: for (Row<WHICH, X> e : QI.algebra().en(WHICH.FRONT)) {
            for (Row<WHICH, X> a : QI.algebra().en(WHICH.BACK)) {
                if (QI.algebra().fk(new Unit(), a).equals(e)) {
                    continue outer;
                }
            }
            T.add(new Pair<>(ed, e));
        }
    }
    return T;
}
Also used : Unit(catdata.Unit) LinkedList(java.util.LinkedList) WHICH(catdata.aql.ED.WHICH) Row(catdata.aql.fdm.EvalAlgebra.Row) EvalInstance(catdata.aql.fdm.EvalInstance) Pair(catdata.Pair)

Aggregations

Pair (catdata.Pair)1 Unit (catdata.Unit)1 WHICH (catdata.aql.ED.WHICH)1 Row (catdata.aql.fdm.EvalAlgebra.Row)1 EvalInstance (catdata.aql.fdm.EvalInstance)1 LinkedList (java.util.LinkedList)1