Exemple #1
0
 /**
  * To find in the union, find in the components, concatenate the results, and omit duplicates.
  * That last is a performance penalty, but I see no way to remove it unless we know the graphs do
  * not overlap.
  */
 @Override
 public ExtendedIterator<Triple> graphBaseFind(final TripleMatch t) {
   Set<Triple> seen = CollectionFactory.createHashedSet();
   return recording(L.find(t), seen).andThen(rejecting(R.find(t), seen));
   // return L.find( t ) .andThen( rejecting( R.find( t ), L ) );
 }
Exemple #2
0
 /** To remove a triple, remove it from <i>both</i> operands. */
 @Override
 public void performDelete(Triple t) {
   L.delete(t);
   R.delete(t);
 }
Exemple #3
0
 @Override
 public boolean graphBaseContains(Triple t) {
   return L.contains(t) || R.contains(t);
 }
Exemple #4
0
 /** To add a triple to the union, add it to the left operand; this is asymmetric. */
 @Override
 public void performAdd(Triple t) {
   L.add(t);
 }