<commit_before>package movavg

// Set is a group of Moving Average calculators:
// https://en.wikipedia.org/wiki/Moving_average
type Set []MA

// Add recalculates Simple Moving Average values and returns them.
func (mas Set) Add(v float64) (newAvgs []float64) {
	newAvgs = make([]float64, len(mas))
	for i, ma := range mas {
		newAvgs[i] = ma.Add(v)
	}
	return newAvgs
}

// Avg returns current Simple Moving Average values.
func (mas Set) Avg() (curAvg []float64) {
	curAvg = make([]float64, len(mas))
	for i, ma := range mas {
		curAvg[i] = ma.Avg()
	}
	return curAvg
}<commit_msg>multi: fix Set godoc comments: it is operating on MA, not on SMA<commit_after>package movavg

// Set is a group of Moving Average calculators:
// https://en.wikipedia.org/wiki/Moving_average
type Set []MA

// Add recalculates Moving Average values and returns them.
func (mas Set) Add(v float64) (newAvgs []float64) {
	newAvgs = make([]float64, len(mas))
	for i, ma := range mas {
		newAvgs[i] = ma.Add(v)
	}
	return newAvgs
}

// Avg returns current Moving Average values.
func (mas Set) Avg() (curAvg []float64) {
	curAvg = make([]float64, len(mas))
	for i, ma := range mas {
		curAvg[i] = ma.Avg()
	}
	return curAvg
}
{'fraction_non_alphanumeric': 0.1371571072319202, 'fraction_numerical': 0.01662510390689942, 'mean_word_length': 3.914285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '541321', 'n_tokens_mistral': 464, 'n_tokens_neox': 436, 'n_words': 144}