|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthcrypto.analyzer.evolutionary.GaIndividual
hcrypto.analyzer.evolutionary.NgramGaIndividual
public class NgramGaIndividual
| Constructor Summary | |
|---|---|
NgramGaIndividual(GaIndividual i)
Copy constructor |
|
NgramGaIndividual(java.lang.String text,
java.lang.String key,
GaParameters params,
NgramArray nga)
|
|
| Method Summary | |
|---|---|
void |
calcFitness()
calcFitness creates a cipher object and decrypts the message with the current key. |
int |
compareTo(java.lang.Object o)
Overrides the default version |
void |
cross(GaIndividual i)
One-point crossover: Pick a random point in i1 and i2 and swap up to NN characters starting from that point. |
java.lang.String |
displayCrossData()
|
boolean |
equals(java.lang.Object i)
|
java.lang.String |
getKey()
|
int |
mutate(double rate)
This version of mutate swaps two random characters in the key. |
java.lang.String |
toString()
|
| Methods inherited from class hcrypto.analyzer.evolutionary.GaIndividual |
|---|
getDecrypt, getFitness |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NgramGaIndividual(java.lang.String text,
java.lang.String key,
GaParameters params,
NgramArray nga)
public NgramGaIndividual(GaIndividual i)
| Method Detail |
|---|
public boolean equals(java.lang.Object i)
equals in class java.lang.Objectpublic void cross(GaIndividual i)
cross in class GaIndividuali - an Individual parentpublic int mutate(double rate)
mutate in class GaIndividualrate - is the mutation ratepublic void calcFitness()
calcFitness in class GaIndividualpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in class GaIndividualpublic java.lang.String displayCrossData()
displayCrossData in class GaIndividualpublic java.lang.String toString()
toString in class GaIndividualpublic java.lang.String getKey()
getKey in class GaIndividual
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||