Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
C
D
E
F
G
M
O
P
S
T
V
A
actionPerformed(ActionEvent)
- Method in class
FoldingApp
The method extract the user input,
chain.getText()
, calls
Folding.solve
to obtain a solution, which is then pass to the FoldPanel
fp
C
Chromosome
- Class in
<Unnamed>
Chromosome(String)
- Constructor for class
Chromosome
A constructor that initializes this chromosome with random moves for this chain.
Chromosome(Chromosome)
- Constructor for class
Chromosome
A constructor that initializes the content of this Chromosome with that of other.
crossOver(Chromosome)
- Method in class
Chromosome
With probability CROSSOVER_RATE the method returns a new Chromosome consisting of a certain number of contiguous genes from this solution and the rest of the genes coming from other.
CROSSOVER_RATE
- Static variable in class
Chromosome
A constant that specifies the cross over rate (see crossover).
D
DEFAULT_CHAIN
- Static variable in class
Folding
The chain that will be used if no argument was supplied on the command line.
DEFAULT_POPULATION_SIZE
- Static variable in class
Population
A constant that will be used as the default size of the population
display()
- Static method in class
StudentInfo
Displays the student information: student name, id, section, etc.
E
evolve()
- Method in class
Population
The method
evolve
selects parent chromosomes.
F
Folding
- Class in
<Unnamed>
The class
Folding
implements the top level of the algorithm.
Folding()
- Constructor for class
Folding
FoldingApp
- Class in
<Unnamed>
FoldingApp()
- Constructor for class
FoldingApp
The constructor creates the layout of the application.
FoldPanel
- Class in
<Unnamed>
FoldPanel()
- Constructor for class
FoldPanel
G
getChain()
- Method in class
Chromosome
Returns the chain of constitents of this chromosome.
getFitness()
- Method in class
Chromosome
Returns an integer value that reflects the quality of the solution.
getFittest()
- Method in class
Population
The instance method
public Chromosome getFittest()
returns the "best" individual of the population, i.e.
getGene(int)
- Method in class
Chromosome
Returns the value of the gene at the given position of the chromosome.
M
main(String[])
- Static method in class
Folding
The main method of this program.
main(String[])
- Static method in class
FoldingApp
Launches the application.
MAX_GENERATIONS
- Static variable in class
Folding
A constant that specifies the maximum number of generations (iterations) for a run.
Move
- Enum in
<Unnamed>
An enumerative type that defines legal moves on a two-dimensional grid.
moves
- Static variable in enum
Move
Caching the array to avoid regenerating it several times
mutate()
- Method in class
Chromosome
Applies mutations to this chromosome.
MUTATION_RATE
- Static variable in class
Chromosome
A constant that specifies the mutation rate (see mutate).
O
OVERLAP_PENALTY
- Static variable in class
Chromosome
A penalty that will be applied for each overlapping constituent.
P
paintComponent(Graphics)
- Method in class
FoldPanel
Called every time the surface needs to be repainted.
Population
- Class in
<Unnamed>
Population(int, String)
- Constructor for class
Population
A constructor of arity 2 to initialize the
Population
.
Population(String)
- Constructor for class
Population
A constructor of arity 1 to initialize the
Population
.
S
setSolution(Chromosome)
- Method in class
FoldPanel
A setter method.
size()
- Method in class
Chromosome
Returns the size of this chromosome, which is the number of genes.
solve(String)
- Static method in class
Folding
Implements the top loop of the genetic algorithm.
StudentInfo
- Class in
<Unnamed>
StudentInfo()
- Constructor for class
StudentInfo
T
toString()
- Method in class
Chromosome
Returns a String representation of this Chromosome.
toString()
- Method in class
Population
Returns a String representation of this Population.
V
valueOf(String)
- Static method in enum
Move
Returns the enum constant of this type with the specified name.
values()
- Static method in enum
Move
Returns an array containing the constants of this enum type, in the order they are declared.
A
C
D
E
F
G
M
O
P
S
T
V
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes