pub fn subsetOf(self: Self, other: Self) bool
Returns true iff all key counts less than or equal to the given multiset.
self: Self
other: Self
787 788 789 790 791 792 793 794 795
pub fn subsetOf(self: Self, other: Self) bool { inline for (@typeInfo(E).@"enum".field_values) |field_value| { const key = @as(E, @fromBackingInt(@intCast(field_value))); if (self.getCount(key) > other.getCount(key)) { return false; } } return true; }
Returns true iff all key counts less than or equal to the given multiset.