More compact Setter
Setting bits is very verbose, I propose some shortcuts like for example:
c.Set(1, 2, 4, 6) or c.SetMultiple(1,2,4,6)
and
c := &bitset.BitSet{1,2,6,6}
I don't think that setting constant numbers is a common task. And if it is and one has many constants one could do:
b := &BitSet{}
for _, e := range []int{2,27,53,100,101,200} {
b.Set(e)
}
So either one has a few constants and he can use Set or has many constants in which case he can use a for loop.
What do you think?
Well, as a library consumer I can imagine to have the range statement on your side of the fence would be useful. I am in the progress of writing a genetic algorithm from scratch. I will see whether this would be a common task or not. But right this moment this requirement came to my mind, in some weeks from now I will know better.
@rusco Adding this function is no big problem for me, but I would like to avoid useless functions. Please let me know if you would find it useful and I'll add it.
When you release your algorithm please let me know :). I want to improve the performance of this library so seeing some code using it would be really helpful.