hcrypto.analyzer
Class GaPopulation

java.lang.Object
  |
  +--hcrypto.analyzer.GaPopulation
Direct Known Subclasses:
FreqGaPopulation, WordBasedGaPopulation

public abstract class GaPopulation
extends java.lang.Object


Field Summary
protected  java.lang.String ciphertext
           
protected  java.lang.String cleantext
           
protected  double cross_rate
           
static double CROSS_RATE
           
protected  GaIndividual[] individual
           
static boolean IS_VERBOSE
           
static int MAX_GENERATIONS
           
protected  int maxtrials
           
protected  double mutate_rate
           
static double MUTATE_RATE
           
protected  GaParameters params
           
static int POPULATION_SIZE
           
protected  int size
           
static boolean TWEAK_ON
           
protected  boolean tweakingOn
           
protected  boolean verbose
           
 
Constructor Summary
GaPopulation(java.lang.String text, GaParameters params)
          GaPopulation() constructor
 
Method Summary
 GaIndividual getFittest(int n)
           
abstract  void init()
          This method initializes the analyzer for the particular type of population.
abstract  void run()
          The generic GA run method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POPULATION_SIZE

public static final int POPULATION_SIZE

MAX_GENERATIONS

public static final int MAX_GENERATIONS

MUTATE_RATE

public static final double MUTATE_RATE

CROSS_RATE

public static final double CROSS_RATE

TWEAK_ON

public static final boolean TWEAK_ON

IS_VERBOSE

public static final boolean IS_VERBOSE

size

protected int size

mutate_rate

protected double mutate_rate

cross_rate

protected double cross_rate

maxtrials

protected int maxtrials

tweakingOn

protected boolean tweakingOn

verbose

protected boolean verbose

ciphertext

protected java.lang.String ciphertext

cleantext

protected java.lang.String cleantext

params

protected GaParameters params

individual

protected GaIndividual[] individual
Constructor Detail

GaPopulation

public GaPopulation(java.lang.String text,
                    GaParameters params)
GaPopulation() constructor
Parameters:
text - -- the text to be cryptanalyzed
params - -- a GaParameters object containing all needed parameters
Method Detail

getFittest

public GaIndividual getFittest(int n)

init

public abstract void init()
This method initializes the analyzer for the particular type of population. It should be implemented in the subclass.

run

public abstract void run()
The generic GA run method.