package
0.0.0-20240409024651-c4af43db5027
Repository: https://github.com/ossf/package-analysis.git
Documentation: pkg.go.dev

# Functions

Calculate finds the entropy of a string S of characters over an alphabet A, which is defined as E(S) = - sum(i in A) { (p(i)) * log(p(i)) }, where p(i) is the probability of observing character i, and the summation is performed over all characters in A.
CalculateNormalised returns the string entropy normalised by the log of the length of the string.
CharacterCounts computes a map of character (rune) to number of occurrences in the input strings.
CharacterProbabilities computes a map of character (rune) to frequency/probability of occurrence in the input strings.