Not() public method

Inverts all the values in the current IBitset, so that elements set to true are changed to false, and elements set to false are changed to true.
public Not ( ) : IBitset
return IBitset
Example #1
0
        /// <summary>
        /// Performs the set difference, defined as the set in A and not in B.
        /// </summary>
        /// <param name="otherSet">the other IBitset</param>
        /// <returns>The set difference of this set and the other.</returns>
        public IBitset Difference(IBitset otherSet)
        {
            RLEBitset otherRLESet = (RLEBitset)otherSet; // cast to an RLEBitset - errors if cannot cast
            IBitset   rtnVal      = And(otherRLESet.Not());

            return(rtnVal);
        }
Example #2
0
        /// <summary>
        /// Performs the set difference, defined as the set in A and not in B.
        /// </summary>
        /// <param name="otherSet">the other IBitset</param>
        public void DifferenceWith(IBitset otherSet)
        {
            RLEBitset otherRLESet = (RLEBitset)otherSet; // cast to an RLEBitset - errors if cannot cast

            AndWith(otherRLESet.Not());
        }