Table of Contents

Class BitSet

Namespace
ICSharpCode.Decompiler.Util
Assembly
ICSharpCode.Decompiler.dll

Improved version of BitArray

public class BitSet
Inheritance
BitSet
Inherited Members

Constructors

BitSet(int)

Creates a new bitset, where initially all bits are zero.

public BitSet(int capacity)

Parameters

capacity int

Properties

this[int]

public bool this[int index] { get; set; }

Parameters

index int

Property Value

bool

Methods

All(int, int)

Gets whether all bits in the specified range are set.

public bool All(int startIndex, int endIndex)

Parameters

startIndex int
endIndex int

Returns

bool

Any()

Gets whether at least one bit is set.

public bool Any()

Returns

bool

Clear(int)

public void Clear(int index)

Parameters

index int

Clear(int, int)

Clear all bits i; where startIndex <= i < endIndex.

public void Clear(int startIndex, int endIndex)

Parameters

startIndex int
endIndex int

ClearAll()

public void ClearAll()

Clone()

public BitSet Clone()

Returns

BitSet

IntersectWith(BitSet)

public void IntersectWith(BitSet other)

Parameters

other BitSet

IsProperSubsetOf(BitSet)

public bool IsProperSubsetOf(BitSet other)

Parameters

other BitSet

Returns

bool

IsProperSupersetOf(BitSet)

public bool IsProperSupersetOf(BitSet other)

Parameters

other BitSet

Returns

bool

IsSubsetOf(BitSet)

Gets whether this set is a subset of other, or equal.

public bool IsSubsetOf(BitSet other)

Parameters

other BitSet

Returns

bool

IsSupersetOf(BitSet)

Gets whether this set is a superset of other, or equal.

public bool IsSupersetOf(BitSet other)

Parameters

other BitSet

Returns

bool

NextSetBit(int, int)

public int NextSetBit(int startIndex, int endIndex)

Parameters

startIndex int
endIndex int

Returns

int

Overlaps(BitSet)

Gets whether at least one bit is set in both bitsets.

public bool Overlaps(BitSet other)

Parameters

other BitSet

Returns

bool

ReplaceWith(BitSet)

public void ReplaceWith(BitSet incoming)

Parameters

incoming BitSet

Set(int)

public void Set(int index)

Parameters

index int

Set(int, int)

Sets all bits i; where startIndex <= i < endIndex.

public void Set(int startIndex, int endIndex)

Parameters

startIndex int
endIndex int

SetBits(int, int)

public IEnumerable<int> SetBits(int startIndex, int endIndex)

Parameters

startIndex int
endIndex int

Returns

IEnumerable<int>

SetEquals(BitSet)

Gets whether both bitsets have the same content.

public bool SetEquals(BitSet other)

Parameters

other BitSet

Returns

bool

ToString()

public override string ToString()

Returns

string

UnionWith(BitSet)

public void UnionWith(BitSet other)

Parameters

other BitSet