hcrypto.analyzer
Class WordBasedGaPopulation

java.lang.Object
  |
  +--hcrypto.analyzer.GaPopulation
        |
        +--hcrypto.analyzer.WordBasedGaPopulation

public class WordBasedGaPopulation
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
 
Constructor Summary
WordBasedGaPopulation(java.lang.String text, GaParameters params)
          WordBasedGaPopulation() constructor
 
Method Summary
 void displayBest()
           
 void displaySummary()
           
 GaIndividual getFittest(int n)
           
 void init()
          This method initializes the analyzer.
 void run()
          This method implements the abstract run() method inherited from GaPopulation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordBasedGaPopulation

public WordBasedGaPopulation(java.lang.String text,
                             GaParameters params)
WordBasedGaPopulation() constructor
Parameters:
text - -- the text to be cryptanalyzed
params - -- a collection of parameters to control the run
Method Detail

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()