|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthcrypto.analyzer.tool.FrequencyTable
public class FrequencyTable
| Field Summary | |
|---|---|
static int |
MAX_CHARS
|
| Fields inherited from interface hcrypto.analyzer.Analyzer |
|---|
DECIPHER_LIMIT |
| Constructor Summary | |
|---|---|
FrequencyTable(java.lang.String text)
|
|
FrequencyTable(java.lang.String text,
int alpha)
|
|
| Method Summary | |
|---|---|
void |
count()
Counts the characters in the text. |
int |
getAlphabeticsCount()
Returns a count of just alphabetic characters |
int |
getCharCount()
Returns a count of all characters. |
int |
getCount(int ch)
Returns the count for a specific character |
FrequencyRecord[] |
getCryptogramFrequencies()
|
int[] |
getFrequencies()
returns the frequencies as an array |
int |
getHighestFreq()
returns the highest frequency character |
int[] |
getHistogramData()
Constructs an array of int out of the frequency tables |
java.lang.String |
getKHighestFreqChar(int k)
returns the the kth highest frequency character |
java.lang.String |
getReport()
|
FrequencyRecord[] |
getSortedCryptogramFrequencies()
|
void |
print()
|
void |
run()
Everything is done in setup. |
void |
setAlphabetRange(int range)
Sets alphabetRange to an ASCII subset. |
void |
setup(java.lang.String text)
From the Analyzer interface. |
java.lang.String |
toString()
Arranges the frequencies as a 2-D table. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_CHARS
| Constructor Detail |
|---|
public FrequencyTable(java.lang.String text)
public FrequencyTable(java.lang.String text,
int alpha)
| Method Detail |
|---|
public void setup(java.lang.String text)
setup in interface Analyzerpublic void run()
run in interface Analyzerpublic java.lang.String getReport()
getReport in interface Analyzerpublic void setAlphabetRange(int range)
public java.lang.String toString()
toString in class java.lang.Objectpublic void print()
public void count()
public int getHighestFreq()
public java.lang.String getKHighestFreqChar(int k)
public FrequencyRecord[] getCryptogramFrequencies()
public FrequencyRecord[] getSortedCryptogramFrequencies()
public int[] getFrequencies()
public int[] getHistogramData()
public int getCharCount()
public int getAlphabeticsCount()
public int getCount(int ch)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||