BitsetsNET.RLEBitset.Flip C# (CSharp) Method

Flip() public method

Flips the bit at the specified index.
public Flip ( int index ) : void
index int Index to be flipped
return void
        public void Flip(int index)
        {
            if (runArray.Count == 0)
            {
                runArray.Add(new Run(index, index));
            }
            else
            {
                if (this.Get(index) == true)
                {
                    this.Set(index, false);
                }
                else
                {
                    this.Set(index, true);
                }
            }
        }

Same methods

RLEBitset::Flip ( int start, int end ) : void