func NameEntropy()

in toutoumomoma.go [283:297]


func NameEntropy(symbols []string) (entropy, variance float64) {
	// Tally classes.
	var (
		counts [256]float64
		n      int
	)
	for _, data := range symbols {
		n += len(data)
		for _, b := range []byte(data) {
			counts[b]++
		}
	}

	return entropyVariance(&counts, n)
}