Improvements to the Not iterator:

- Pass the all iterator as an argument
 - Fixed next method (call all.Next() ).
This commit is contained in:
Matei Chiperi 2014-08-28 16:02:21 -07:00
parent def70ca12e
commit a5fd1905d0
2 changed files with 51 additions and 21 deletions

View file

@ -305,8 +305,9 @@ func buildIteratorTreeHelper(obj *otto.Object, ts graph.TripleStore, base graph.
return iterator.NewNull()
}
allIt := ts.NodesAllIterator()
toComplementIt := buildIteratorTree(firstArg.Object(), ts)
notIt := iterator.NewNot(ts, toComplementIt)
notIt := iterator.NewNot(toComplementIt, allIt)
and := iterator.NewAnd()
and.AddSubIterator(subIt)