Union sets $a and $b.
14490
public function union($a, $b)
	{
		$ar = $this->find($a);
		$br = $this->find($b);

		if ($ar !== $br) {
			$this->parents[$br] = $ar;
		}

		/*
		$c = function($x) {
			return sprintf('<span style="background:#%x">%s</span>', crc32($x) & 0xffffff | 0x808080, $x);
		};

		echo '<br><b>', $c($a), ' == ', $c($b), "</b><br>";
		var_dump($this->parents);
		echo '    ', $c($a), ' … ', ($ar === $this->parents[$ar] ? $c($ar).' is root' : '<b>'.$c($ar).' is NOT root!</b>'), "<br>";
		echo '    ', $c($b), ' … ', ($br === $this->parents[$br] ? $c($br).' is root' : '<b>'.$c($br).' is NOT root!</b>'), "<br>";
		echo '    ', $c($ar), ' =?= ', $c($br), "<br>";
		echo '    ', $c($br), ' --&gt; ', $c($this->parents[$br]), "<br>";
		// */
	}
405173
public static Boolean and(Boolean a, Boolean b) 
  {
    return andTable[ttIndex(a)][ttIndex(b)];
  }
462065
def union(other)
      if other.is_a?(RelativeComplement)
        # A ∪ ¬B = ¬B ∪ A
        other.union(self)
      elsif other.is_a?(AbstractSet)
        unless other.is_a?(RelativeSet) and size < other.size
          hash = other.inject(@hash.clone){|h,o| h[o] = true; h }

          if hash.empty?
            NullSet.build
          else
            RelativeSet.new(hash)
          end
        else
          # For efficiency, iterate the smaller of the two sets: A ∪ B = B ∪ A
          if other.empty?
            self
          else
            other.union(self)
          end
        end
      else
        union(Cantor.build(other))
      end
    end
168219
public static long unionCount(OpenBitSet a, OpenBitSet b) {
        long tot = BitUtil.pop_union( a.bits, b.bits, 0, Math.min( a.wlen, b.wlen ) );
        if (a.wlen < b.wlen) {
            tot += BitUtil.pop_array( b.bits, a.wlen, b.wlen - a.wlen );
        } else if (a.wlen > b.wlen) {
            tot += BitUtil.pop_array( a.bits, b.wlen, a.wlen - b.wlen );
        }
        return tot;
    }
1252446
function(and, or) {
			var aDiff = set.difference(and, or.values[0]);
			var bDiff = set.difference(and, or.values[1]);
			return set.intersection(aDiff, bDiff);
		}
989168
def UGE(a: BitVec, b: BitVec) -> Bool:
    
    return Or(UGT(a, b), a == b)
1371228
@SuppressWarnings("unchecked")
  private Object union(Linker linker, Object a, Object b) {
    if (a instanceof List) {
      return union((List<?>) a, (List<?>) b);
    } else if (a instanceof Map) {
      return union(linker, (Map<ProtoMember, Object>) a, (Map<ProtoMember, Object>) b);
    } else {
      linker.addError("conflicting options: %s, %s", a, b);
      return a; // Just return any placeholder.
    }
  }
196644
public static void union (IRectangle src1, IRectangle src2, Rectangle dst) {
        float x1 = Math.min(src1.minX(), src2.minX());
        float y1 = Math.min(src1.minY(), src2.minY());
        float x2 = Math.max(src1.maxX(), src2.maxX());
        float y2 = Math.max(src1.maxY(), src2.maxY());
        dst.setBounds(x1, y1, x2 - x1, y2 - y1);
    }
1283840
def merge(a, b):
    ""
    for key in b:
        if isinstance(a.get(key), dict) and isinstance(b.get(key), dict):
            merge(a[key], b[key])
        else:
            a[key] = b[key]
    return a
91196
public static boolean sameSet(final Object[] a, final Vector b) {
    if (a == null || b == null || a.length != b.size()) {
      return false;
    }
    if (a.length == 0) {
      return true;
    }
    // Convert the array into a set
    final Hashtable t = new Hashtable();
    for (final Object element : a) {
      t.put(element, element);
    }
    for (int i = 0; i < b.size(); i++) {
      final Object o = b.elementAt(i);
      if (t.remove(o) == null) {
        return false;
      }
    }
    return t.size() == 0;
  }
204271
def union(self, i, j):
        '''
        
        '''
        roots = (self.find(i), self.find(j))
        if roots[0] == roots[1]:
            return False
        if self.sizes[roots[0]] <= self.sizes[roots[1]] or not self.optimize:
            self.add_edge(roots[0], roots[1])
            self.sizes[roots[1]] += self.sizes[roots[0]]
            return True
        else:
            self.add_edge(roots[1], roots[0])
            self.sizes[roots[0]] += self.sizes[roots[1]]
            return True
965469
def union(self, other):
        
        result = IntervalSet()
        for el in self:
            result.add(el)
        for el in other:
            result.add(el)
        return result
655556
public AsciiSet union(AsciiSet set) {
    final boolean[] unionMembers = new boolean[128];
    for (int i = 0; i < unionMembers.length; ++i) {
      unionMembers[i] = members[i] || set.members[i];
    }
    return new AsciiSet(unionMembers);
  }
1180476
public static <T> Set<T> union(Collection<Set<T>> sets) {
		Set<T> result = new HashSet<>();
		if (sets.isEmpty()) {
			return result;
		}
		Iterator<Set<T>> iter = sets.iterator();
		result.addAll(iter.next());

		if (sets.size() == 1) {
			return result;
		}

		while (iter.hasNext()) {
			result.addAll(iter.next());
		}
		return result;
	}
557720
def union(self, label_a, label_b):
        
        # Base case to avoid work
        if label_a == label_b:
            return

        # Find the tree root of each node
        root_a = self.find(label_a)
        root_b = self.find(label_b)

        # Avoid merging a tree to itself
        if root_a == root_b:
            return

        self.__internal_union(root_a, root_b)
        self.__set_counter -= 1
337564
public static final <A,B> Set<OrderedPair<A,B>> cartesianProduct(Set<A> a, Set<B> b)
    {
        Set<OrderedPair<A,B>> set = new HashSet<>();
        for (A t : a)
        {
            for (B v : b)
            {
                set.add(new OrderedPair(t, v));
            }
        }
        return set;
    }
670153
function(a, b)
{
    return (a.l <= b.r && b.l <= a.r && a.b <= b.t && b.b <= a.t);
}