Module:Harmonic entropy/doc: Difference between revisions

Created page with "This module provides several functions to work with interval-related math. Namely, the functions in this module can be called from other modules using <code>require('Modu..."
 
Ganaram inukshuk (talk | contribs)
put back function descriptions
 
(19 intermediate revisions by 6 users not shown)
Line 1: Line 1:
This module provides several functions to work with [[interval]]-related math.
{{documentation|{{dochead|header=library}}
This module provides a means to calculate harmonic Shannon entropy of a particular interval.  


Namely, the functions in this module can be called from other modules using <code>require('Module:Interval')</code> and calling the <code>_</code>-prefixed functions.
{{module introspection
 
| desc_harmonic_entropy=Computes [[Harmonic entropy#Basic Model: Shannon Entropy|harmonic Shannon entropy]] of an interval of <code>c</code> [[cent]]s across <code>ratios</code> with a Gaussian with standard <code>deviation</code> (also in [[cent]]s) and a <code>norm</code> associated with the <code>ratios</code>.}}
== Functions ==
}}
* <code>to_cents(ratio, prec)</code> returns the measure in [[cent]]s of an interval [[ratio]], rounded to a precision of <code>prec</code> decimal places. Parameter <code>prec</code> defaults to 3 if it is omitted.
** ''Known issue: the ratio cannot be given as a fraction (e.g. 3/2); it must be given as a decimal number (e.g. 1.5).''
 
<includeonly><hr><small>Documentation transcluded from [[/doc]]</small> [[Category:Lua modules]]</includeonly>