Entropy: Difference between revisions

No change in size ,  3 years ago
→‎Go: Map version: Corrected a variable name.
(Rewrote it in a more functional style.)
(→‎Go: Map version: Corrected a variable name.)
Line 1,045:
m[r]++
}
var fmhm float64
for _, c := range m {
hm += c * math.Log2(c)
9,483

edits