Module:Infobox ET: Difference between revisions
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
local ET = require("Module:ET") | local ET = require("Module:ET") | ||
local infobox = require("Module:Infobox") | local infobox = require("Module:Infobox") | ||
local interval_extension = require("Module:Interval_extension") | |||
-- check whether the input is a non-empty string | -- check whether the input is a non-empty string | ||
| Line 201: | Line 202: | ||
}) | }) | ||
end | end | ||
harmonic_entropy = 0 | |||
for i=1, math.floor(et.size) do | |||
harmonic_entropy = harmonic_entropy + interval_extension.harmonic_entropy_with_lookup_table(step_size * i) | |||
end | |||
harmonic_entropy = harmonic_entropy / et | |||
table.insert(infobox_data, { | |||
"[[Harmonic entropy]]<br/>(Shannon, <math>\\sqrt{n\\cdot d}</math>)", | |||
"~" .. utils._round(harmonic_entropy, 6) .. " bits", | |||
}) | |||
-- special properties | -- special properties | ||