/// <summary>
/// Creates a RLEBitset from an array of indices.
/// Each value in the input array represents the position (i.e. index) of a 1.
/// </summary>
/// <param name="indices">an array of integers representing the positions of 1's</param>
/// <returns>an RLEBitset</returns>
public static IBitset CreateFrom(int[] indices)
{
int capacity = 0;
if (indices.Length > 0)
{
capacity = indices.Max() + 1;
}
return(RLEBitset.CreateFrom(indices, capacity));
}