Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Entropy/Icon/entropy.icon
Normal file
11
Task/Entropy/Icon/entropy.icon
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
procedure main(a)
|
||||
s := !a | "1223334444"
|
||||
write(H(s))
|
||||
end
|
||||
|
||||
procedure H(s)
|
||||
P := table(0.0)
|
||||
every P[!s] +:= 1.0/*s
|
||||
every (h := 0.0) -:= P[c := key(P)] * log(P[c],2)
|
||||
return h
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue