Adds tuples from input1 whose key is not present in input2.
Examples
This example starts a collection with the pairs (x, x+1) for x in 0 .. 10. It then
adds any pairs (x+1,x) for which x is not a multiple of three. That excludes four
pairs (for 0, 3, 6, and 9) which should leave us with 16 total pairs.
use datafrog::{Iteration, Relation};
let mut iteration = Iteration::new();
let variable = iteration.variable::<(usize, usize)>("source");
variable.insert(Relation::from((0 .. 10).map(|x| (x, x + 1))));
let relation = Relation::from((0 .. 10).filter(|x| x % 3 == 0));
while iteration.changed() {
variable.from_antijoin(&variable, &relation, |&key, &val| (val, key));
}
let result = variable.complete();
assert_eq!(result.len(), 16);
Adds tuples from input1 whose key is not present in input2.
Examples
This example starts a collection with the pairs (x, x+1) for x in 0 .. 10. It then adds any pairs (x+1,x) for which x is not a multiple of three. That excludes four pairs (for 0, 3, 6, and 9) which should leave us with 16 total pairs.