CopyBag X is smaller than CopyBag Y iff all of these conditions hold (where count(A, a) is shorthand for the count associated with a in A):

  1. For every x in X, x is also in Y and count(X, x) <= count(Y, x).
  2. There is a y in Y such that y is not in X or count(X, y) < count(Y, y).

X is equivalent to Y iff the condition 1 holds but condition 2 does not.

  • Type Parameters

    • K extends Key

    Parameters

    • left: CopyBag<K>
    • right: CopyBag<K>

    Returns number