Class HBitArray
HBitArray is a hierarchical variant of BitArray. Basically the idea
is to make a tree of 32-bit blocks, where at level N, a '0' means that
no bits are true in level N-1. This means we can more efficiently iterate
over the bit set.
Uses more memory than BitArray, but each tree level is divided by 32, so
it is better than NlogN
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class HBitArray : IEnumerable<int>, IEnumerable
Constructors
HBitArray(Int32)
Declaration
public HBitArray(int maxIndex)
Parameters
Type |
Name |
Description |
Int32 |
maxIndex |
|
Properties
Count
Declaration
public int Count { get; }
Property Value
Item[Int32]
Declaration
public bool this[int i] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Property Value
TrueCount
Declaration
public int TrueCount { get; }
Property Value
Methods
Add(Int32)
Declaration
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Contains(Int32)
Declaration
public bool Contains(int i)
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Returns
Get(Int32)
Declaration
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Returns
GetEnumerator()
Declaration
public IEnumerator<int> GetEnumerator()
Returns
Set(Int32, Boolean)
Declaration
public void Set(int i, bool value)
Parameters
Implements