Set difference of U and A, denoted U \ A, is the set of all members of U
that are not members of A
@param <T>
@param u
@param a
@return
483983
public static final <T> Set<T> difference(Set<T> u, Set<T> a)
    {
        Set<T> set = new HashSet<>(u);
        set.removeAll(a);
        return set;
    }
478355
@javax.annotation.Nonnull
  public static double[] op(@javax.annotation.Nonnull final double[] a, @javax.annotation.Nonnull final DoubleUnaryOperator fn) {
    @javax.annotation.Nonnull final double[] c = new double[a.length];
    for (int j = 0; j < a.length; j++) {
      c[j] = fn.applyAsDouble(a[j]);
    }
    return c;
  }
1291454
def difference(self, *args):
        
        setobj = set(self.obj)
        for i, v in enumerate(args):
            setobj = setobj - set(args[i])
        return self._wrap(self._clean._toOriginal(setobj))
255589
function(or, and) {
			var aDiff = set.difference(or, and.values[0]);
			var bDiff = set.difference(or, and.values[1]);
			return set.union(aDiff, bDiff);
		}
548487
@Override
    public boolean setA(ZMatrixRMaj A) {
        if( A.numRows > maxRows || A.numCols > maxCols ) {
            setMaxSize(A.numRows,A.numCols);
        }

        _setA(A);
        if( !decomposer.decompose(A) )
            return false;

        Q.reshape(numRows,numRows);
        R.reshape(numRows,numCols);
        decomposer.getQ(Q,false);
        decomposer.getR(R,false);
        CommonOps_ZDRM.transposeConjugate(Q,Qt);

        return true;
    }
335873
function difference(arrayA, arrayB) {
  var maxLength = _.max([ arrayA.length, arrayB.length ]);

  for (var i = 0, j = 0; i < maxLength; i += 1, j += 1) {
    if (arrayA[i] !== arrayB[j]) {
      if (arrayB[i-1] === arrayA[i]) {
        j -= 1;
      } else if (arrayB[i+1] === arrayA[i]) {
        j += 1;
      } else {
        return arrayA[i];
      }
    }
  }
}
1152916
public AsciiSet diff(AsciiSet set) {
    final boolean[] diffMembers = new boolean[128];
    for (int i = 0; i < diffMembers.length; ++i) {
      diffMembers[i] = members[i] && !set.members[i];
    }
    return new AsciiSet(diffMembers);
  }
845215
public ObjectHashSet<T> difference(final ObjectHashSet<T> other)
    {
        ObjectHashSet<T> difference = null;

        for (final T value : values)
        {
            if (value != MISSING_VALUE && !other.contains(value))
            {
                if (difference == null)
                {
                    difference = new ObjectHashSet<>(size);
                }

                difference.add(value);
            }
        }

        return difference;
    }
382625
public static <T> ImmutableSet<T> differenceAsSets(Iterable<T> left, Iterable<T> right) {
    return Sets.difference(ImmutableSet.copyOf(left), ImmutableSet.copyOf(right)).immutableCopy();
  }
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;
  }
383480
@Override
    public boolean setA(DMatrixRMaj A) {
        if( A.numRows > maxRows || A.numCols > maxCols )
            setMaxSize(A.numRows,A.numCols);

        _setA(A);
        if( !decomposer.decompose(A) )
            return false;

        QR = decomposer.getQR();
        return true;
    }
1033114
public static void changeSign( DMatrix6 a )
    {
        a.a1 = -a.a1;
        a.a2 = -a.a2;
        a.a3 = -a.a3;
        a.a4 = -a.a4;
        a.a5 = -a.a5;
        a.a6 = -a.a6;
    }
457400
public static void changeSign( DMatrix5 a )
    {
        a.a1 = -a.a1;
        a.a2 = -a.a2;
        a.a3 = -a.a3;
        a.a4 = -a.a4;
        a.a5 = -a.a5;
    }
469975
public static <T extends Comparable<? super T>> T q1(T[] a) {
        int k = a.length / 4;
        return select(a, k);
    }
891890
public static void setIdentity( DMatrix4x4 a ) {
        a.a11 = 1; a.a21 = 0; a.a31 = 0; a.a41 = 0;
        a.a12 = 0; a.a22 = 1; a.a32 = 0; a.a42 = 0;
        a.a13 = 0; a.a23 = 0; a.a33 = 1; a.a43 = 0;
        a.a14 = 0; a.a24 = 0; a.a34 = 0; a.a44 = 1;
    }
952905
def symmetric_difference(other)
      if other.is_a?(RelativeComplement)
        # A ⊖ ~B = (A ∖ ¬B) | (¬B ∖ A)
        #        = (A ∩ B)  | (¬B ∩ ¬A)
        #        = (B ∖ ¬A) | (¬A ∖ B)
        #        = ~A ⊖ B
        intersection(other.complement).
          union(other.intersection(complement))
      else
        # A ⊖ B = (A ∖ B) | (B ∖ A)
        #       = (A ∪ B) - (A ∩ B)
        other = Cantor.build(other)

        if other.empty?
          self
        else
          union(other).difference(intersection(other))
        end
      end
    end
1014441
public static void subtractEquals( DMatrix3 a , DMatrix3 b ) {
        a.a1 -= b.a1;
        a.a2 -= b.a2;
        a.a3 -= b.a3;
    }