BitsetsNET.RLEBitset.Set C# (CSharp) Method

Set() public method

Sets the bit at a specific position in the IBitset to the specified value.
public Set ( int index, bool value ) : void
index int The zero-based index of the bit to set.
value bool The Boolean value to assign to the bit.
return void
        public void Set(int index, bool value)
        {
            int[] tmpIndices = { index };
            IBitset other = RLEBitset.CreateFrom(tmpIndices, this.length);
            if (value)
            {
                OrWith(other);
            }
            else
            {
                DifferenceWith(other);
            }
        }

Same methods

RLEBitset::Set ( int start, int end, bool value ) : void