Package org.jastacry.test.utils
Class ShannonEntropy
- java.lang.Object
-
- org.jastacry.test.utils.ShannonEntropy
-
public final class ShannonEntropy extends java.lang.Object
Helper functions for checking entropy.
-
-
Constructor Summary
Constructors Constructor Description ShannonEntropy()
Constructor of class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculate(byte[] bArray)
Calculate entropy.void
calculate(java.lang.String in)
Calculate entropy.double
getEntropy()
java.lang.String
toString()
-
-
-
Method Detail
-
getEntropy
public double getEntropy()
-
calculate
public void calculate(java.lang.String in)
Calculate entropy.- Parameters:
in
- String to analyze
-
calculate
public void calculate(byte[] bArray)
Calculate entropy.- Parameters:
bArray
- byte array to analyze
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-