Class Entropy
java.lang.Object
Entropy
- public class Entropy
- extends java.lang.Object
Computation of the order k entropy of a text.
Usage: Entropy k file. Prints
the value of the k-th order entropy
of the text contained in file. Uses
the classes Element and Buffer.
|
Method Summary |
static float |
entropy(int k,
float[] s,
int dim)
Returns -(1/k)Sigma s[i]log(s[i]). |
static void |
init(java.io.Reader in,
int k,
int dim,
float[] s)
|
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Entropy
public Entropy()
entropy
public static float entropy(int k,
float[] s,
int dim)
- Returns
-(1/k)Sigma s[i]log(s[i]).
init
public static void init(java.io.Reader in,
int k,
int dim,
float[] s)
throws java.io.IOException
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException