hcrypto.analyzer
Class FreqGaPopulation
java.lang.Object
|
+--hcrypto.analyzer.GaPopulation
|
+--hcrypto.analyzer.FreqGaPopulation
- public class FreqGaPopulation
- extends GaPopulation
Fields inherited from class hcrypto.analyzer.GaPopulation |
ciphertext, cleantext, cross_rate, CROSS_RATE, individual, IS_VERBOSE, MAX_GENERATIONS, maxtrials, mutate_rate, MUTATE_RATE, params, POPULATION_SIZE, size, TWEAK_ON, tweakingOn, verbose |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_CHANGE_LIMIT
public static final int NO_CHANGE_LIMIT
N_SHUFFLES
public static final int N_SHUFFLES
FreqGaPopulation
public FreqGaPopulation(java.lang.String text,
GaParameters params)
- FreqGaPopulation() constructor
- Parameters:
text
- -- the text to be cryptanalyzedparams
- -- a collection of parameters to control the run
init
public void init()
- This method initializes the analyzer. It sorts the tokens in the
cryptogram to give preference to those with the smallest (non empty)
pattern sets. It then creates the population, giving each individual
an encryption key based on a pairing of a token from the cryptogram
and a word from the pattern word dictionary.
- Overrides:
init
in class GaPopulation
run
public void run()
- This method implements the abstract run() method inherited from
GaPopulation.
- Overrides:
run
in class GaPopulation
getFittest
public GaIndividual getFittest(int n)
- Overrides:
getFittest
in class GaPopulation
displayBest
public void displayBest()
displaySummary
public void displaySummary()