Class IndexFlagSet
This class provides a similar interface to BitArray, but can optionally
use a HashSet (or perhaps some other DS) if the fraction of the index space
required is small
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class IndexFlagSet : IEnumerable<int>, IEnumerable
Constructors
IndexFlagSet(Boolean, Int32)
Declaration
public IndexFlagSet(bool bForceSparse, int MaxIndex = -1)
Parameters
IndexFlagSet(Int32, Int32)
Declaration
public IndexFlagSet(int MaxIndex, int SubsetCountEst)
Parameters
Type |
Name |
Description |
Int32 |
MaxIndex |
|
Int32 |
SubsetCountEst |
|
Properties
Count
Returns number of true values in set
Declaration
public int Count { get; }
Property Value
Item[Int32]
Declaration
public bool this[int key] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
key |
|
Property Value
Methods
Add(Int32)
Declaration
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Contains(Int32)
checks if value i is true
Declaration
public bool Contains(int i)
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Returns
GetEnumerator()
enumerate over indices w/ value = true
Declaration
public IEnumerator<int> GetEnumerator()
Returns
Implements