<commit_before>package set

// SparseBitSet XXX
type SparseBitSet struct {
	data map[int]uint64
}

// NewSparseBitSet returns a pointer to new BitSet
func NewSparseBitSet() *SparseBitSet {
	b := &SparseBitSet{
		data: make(map[int]uint64),
	}
	return b
}

// Set sets given bit to true
func (b *SparseBitSet) Set(i int) {
	x, y := b.getIndex(i)
	value, ok := b.data[x]
	mask := b.getMask(y)
	if ok {
		value |= mask
	} else {
		value = mask
	}
	b.data[x] = value
}

// SetMany sets given bits to true
func (b *SparseBitSet) SetMany(indexes ...int) {
	for _, idx := range indexes {
		b.Set(idx)
	}
}

// SetRange sets bits in range [i,j] to true
func (b *SparseBitSet) SetRange(i, j int) {
	for idx := i; idx <= j; idx++ {<commit_msg>set: SparseBitSet simplify Set operation<commit_after>package set

// SparseBitSet XXX
type SparseBitSet struct {
	data map[int]uint64
}

// NewSparseBitSet returns a pointer to new BitSet
func NewSparseBitSet() *SparseBitSet {
	b := &SparseBitSet{
		data: make(map[int]uint64),
	}
	return b
}

// Set sets given bit to true
func (b *SparseBitSet) Set(i int) {
	x, y := b.getIndex(i)
	value := b.data[x]
	b.data[x] = value | b.getMask(y)
}

// SetMany sets given bits to true
func (b *SparseBitSet) SetMany(indexes ...int) {
	for _, idx := range indexes {
		b.Set(idx)
	}
}

// SetRange sets bits in range [i,j] to true
func (b *SparseBitSet) SetRange(i, j int) {
	for idx := i; idx <= j; idx++ {
{'fraction_non_alphanumeric': 0.14135759272218335, 'fraction_numerical': 0.005598320503848845, 'mean_word_length': 3.554140127388535, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4375559', 'n_tokens_mistral': 582, 'n_tokens_neox': 568, 'n_words': 173}