\chapter{Implementation}
\section{Generelle Hinweise}
Dieses Programm wurde unter S. u. S. E. Linux 4.3 - Kernel 2.0.18 auf einem 486 PC entwickelt. Als Entwicklungstool wurde der Java Development Kit Version 1.1.3, auch als JDK 1.1.3 \cite{javasoft} bekannt, verwendet. Mit diesem Tool können Applets und Applikationen in Java 1.1 geschrieben werden. Als Java Grundlagenbuch diente Core Java \cite{javabook}. Insbesondere wurde aber die JDK 1.1.3 Online-Dokumentation verwendet.\\
Grundstrukturen der graphischen Benutzeroberfläche wurden unter Zuhilfenahme von Visual Age in Windows95 erstellt. Dieses Programm ermöglicht die Gestaltung und Programmierung von Oberflächen in Java. Damit war es möglich ein Prototyping in der Art und Weise durchzuführen, als daß zuerst die komplette Oberfläche des zukünftigen Programms entwickelt wurde und erst danach die dahinterstehenden Funktionalitäten implementiert wurden.\\
Für die Erstellung der Kurzdokumentation TSPGA.html wurde FrontPage97 unter Windows95 verwendet. Dieses Programm ermöglicht die Gestaltung von Web Seiten.\\
Als grundlegende graphische Objekte des objektorientierten Designs wurden sogenannte Frames und Dialogs verwendet, die wiederum unterschiedlichste Objekte beinhalten können. Eines davon ist eine Zeichenfläche, auch Canvas genannt. Von dieser Klasse abgeleitete Klassen können als Zeichenflächen für unterschiedlichste Zwecke verwendet werden.\\ 
Der GA läuft in einer Objektstruktur ab, in welcher Individuen, Populationen und die Funktionalitäten des GAs (Algorithmus) durch jeweils eigene Objekte repräsentiert werden.\\
In Java beinhaltet jede Datei genau eine (public) Klasse.\\ 
Mit Hilfe von javadoc, einem Tool zum automatischen Extrahieren von in Javacodefiles stehenden Kommentaren, kann eine Programmdokumenation erzeugt werden. Es wird je Javacodefile eine HTML-Datei erzeugt. Bei mehreren angegebenen Files wird zusätzlich noch eine Klassenhierarchie (tree.html) und ein Indexfile (AllNames.html) erzeugt. \\Im folgenden wird eine Zusammenfassung der in diesem Programm existierenden Klassen und Funktionen gegeben. Die vollständige Dokumentation ist dem Programm beigestellt und mit Hilfe eines Web Browsers zu betrachten. Eine genauere Beschreibung von javadoc ist unter anderem in dem Verzeichnis jdk1.1.3/docs/tooldocs zu finden.



\newpage
\section{Klassenhierarchie}
\vspace{25pt}
\begin{tabbing}
class\=~java.lang.Object\label{object}\\  
\> class \underline{Algorithm}, repräsentiert den ganzen GA (siehe Seite~\pageref{algorithm})\\    
\> class\=~java.awt.Component\\
\> \> class\=~java.awt.Canvas, Basisklasse für Zeichenoberflächen\\
\> \> \> class \underline{ErxCanvas}, für ERX und ERX mit Heuristik (siehe Seite~\pageref{erxcanvas})\\        
\> \> \> class \underline{PopCanvas}, für die aktuelle Population (siehe Seite~\pageref{popcanvas})\\        
\> \> \> class \underline{RecombCanvas}, für die aktuelle Generation (siehe Seite~\pageref{recombcanvas})\\
\> \> \> class \underline{StatisticCanvas}, für die Statistik (siehe Seite~\pageref{statisticcanvas})\\      
\> \> \> class \underline{StringCanvas}, für PMX, CX, OX, UOBX (siehe Seite~\pageref{stringcanvas})\\        
\> \> \> class \underline{TownCanvas}, für die Einstellung des TSP (siehe Seite~\pageref{towncanvas})\\ 
\> \> \> class \underline{TravelCanvas}, für die Rundreisendarstellung (siehe Seite~\pageref{travelcanvas})\\      
\> \> class java.awt.Container\\      
\> \> \> class\=~java.awt.Panel\\        
\> \> \> \> class\=~java.applet.Applet\\          
\> \> \> \> \>class \underline{TSPGA}, Graphik-Hauptfenster (siehe Seite~\pageref{tspga})\\ 
\> \> \> class java.awt.Window\\        
\> \> \> \> class java.awt.Dialog\\          
\> \> \> \> \> class \underline{AboutDialog}, Informationsdialog (siehe Seite~\pageref{aboutdialog})\\     
\> \> \> \> \> class \underline{RunDialog}, Ablaufdialog (siehe Seite~\pageref{rundialog})\\ 
\> \> \> class java.awt.Frame\\ 
\> \> \> \> class \underline{FinalFrame}, speichert GA Durchlauf (siehe Seite~\pageref{finalframe})\\ 
\> \> \> \> class \underline{TripFrame}, speichert eine Rundreise (siehe Seite~\pageref{tripframe})\\
\> \> class java.awt.TextComponent\\      
\> \> \> class java.awt.TextField\\        
\> \> \> \> class \underline{IntTextField}, Textfeld-Erweiterung (siehe Seite~\pageref{inttextfield})\\        
\> class \underline{ConnectInfo}, Information für RunDialog (siehe Seite~\pageref{connectinfo})\\    
\> class \underline{DialogData}, Default- und Parameterwerte (siehe Seite~\pageref{dialogdata})\\    
\> class \underline{Individual}, repräsentiert ein Individuum (siehe Seite~\pageref{individual})\\    
\> class \underline{MyRandom}, einige spezielle Zufallsgeneratoren\\
\> class \underline{Population}, repräsentiert eine Population (siehe Seite~\pageref{popul})\\    
\> interface \underline{ResultProcessor}, Interface für RunDialog\\    
\> class \underline{TravelData}, speichert die Städtedaten (siehe Seite~\pageref{traveldata})\\    
\> class \underline{VisRecomb}, für Visualisierung der Rekombination (siehe Seite~\pageref{visrecomb})\\  
\end{tabbing}

%\section{Class Documentation}
%cat algorithm.tex erxcanvas.tex popcanvas.tex recombcanvas.tex statisticcanvas.tex stringcanvas.tex towncanvas.tex travelcanvas.tex tspga.tex aboutdialog.tex rundialog.tex finalframe.tex tripframe.tex inttextfield.tex connectinfo.tex dialogdata.tex individual.tex population.tex traveldata.tex visrecomb.tex >jdoc.tex

\small
\section{Klassendokumentation}
\subsection*{  Class Algorithm}\label{algorithm}

\begin{alltt}

java.lang.Object
   |
   +----Algorithm

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
%\rule{\linewidth}{1pt}
\par

\begin{description}
  
\item public class {\bf Algorithm}   extends Object\\This class represents the whole GA and contains all recombination and mutation methods.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf Algorithm}}(DialogData a, TravelData b)  ]\par
This constructor creates the populations and the array to store the selected individuals, evaluates the selection, initializes the start population and sorts it.\\
parameter a {\bf DialogData}\\
parameter b {\bf TravelData}
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf crossover}}()  ]\par
  calls the selected crossover method  
\item[  o  void \underline{{\bf cyclecrossover}}()  ]\par
This recombination method selects a gen of the first parent per random. A cycle of gens caused by that gen is then contents of the child. The other gens are set in order of the second parent.
\item[  o  void \underline{{\bf displacement}}()  ]\par
This mutator selects a part of the individual per random and inserts this part at a random place in the new individual.
\item[  o  boolean \underline{{\bf doit}}(int bound)  ]\par
selects a random number and compares it with the parameter bound\\
parameter bound: probability to use the operator (recombination or mutation)\\
return value: do the recombination / mutation or not
\item[  o  void \underline{{\bf erx}}(boolean heuristic)  ]\par
This recombination method (improved erx) creates an edge list for each town. Double edges get marked. Starting at a random town the edge list is worked out. If the parameter heuristic is true always the shortest connection in the list is taken, otherwise the town with the shortest list. Double entries are favoured.\\
parameter heuristic: with or without heuristic
\item[  o  void \underline{{\bf evaluate}}()  ]\par
Evaluates the mutated population, creates and sorts a copy. If the option elitism is set then the best individual of the last generation is added to the mutated population.
\item[  o  Population \underline{{\bf getPop}}(int a)  ]\par
gets the spezified population\\
parameter a: number of the needed population\\
return value {\bf Population}
\item[  o  {Individual[]} \underline{{\bf getSelection}}()  ]\par
  gets the array with the selected individuals\\
return value: {\bf Individual} array
\item[  o  int \underline{{\bf getSelectionSize}}()  ]\par
  gets the value of the selection size\\
return value: selection size
\item[  o  void \underline{{\bf holdPop}}()  ]\par
copies the unsorted mutated population to the sorted population and marks the added individual if elitism is true
\item[  o  void \underline{{\bf insertion}}()  ]\par
This mutator selects a gen of the individual per random and inserts this gen at a random place in the new individual.
\item[  o  void \underline{{\bf inversion}}()  ]\par
This mutator selects a part of the individual per random, inverts this part and inserts it into the new individual.
\item[  o  void \underline{{\bf mutation}}()  ]\par
  calls the selected mutation method  
\item[  o  void \underline{{\bf nonemut}}()  ]\par
This mutator copies the recombinated population to the mutated population.
\item[  o  void \underline{{\bf nonerecomb}}()  ]\par
This recombination method always copies the first parent to the recombinated population.
\item[  o  void \underline{{\bf ordercrossover}}()  ]\par
This recombination method selects a part of the first parent per random as a crossover area. The child contains this area unchanged. The other gens are set in order of the second parent in a determined way following the OX method.
\item[  o  void \underline{{\bf pmx}}()  ]\par
This recombination method selects a part of the first parent per random as a crossover area. The child contains this area unchanged. The other gens are set in order of the second parent in a determined way following the PMX method.
\item[  o  void \underline{{\bf populate}}()  ]\par
  the sorted mutation population becomes the new actual population
\item[  o  void \underline{{\bf selection}}()  ]\par
does the selection out of the actual population always using tournament selection with the selected group size
\item[  o  void \underline{{\bf setSim}}()  ]\par
  sets the simulation flag  
\item[  o  void \underline{{\bf swap}}()  ]\par
This mutator selects a gen and a position per random. Then the selected gen and the gen at the selected position are swapped.
\item[  o  void \underline{{\bf unsetSim}}()  ]\par
  unsets the simulation flag  
\item[  o  void \underline{{\bf uobx}}()  ]\par
This recombination method uses a randomly generated array filled with ones and zeros. Gens from the first parent including a one in the array come into the child. The other gens are set in order of the second parent.
\end{description}

\subsection*{  Class ErxCanvas}\label{erxcanvas}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----ErxCanvas

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf ErxCanvas}   extends Canvas\\This class visualizes the recombination method, if ERX or ERX with heuristic is selected. 
%\\coding:   h.sarg \\modified: 01\slash 98
\end{description}

\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf ErxCanvas}}()  ]\par
  ErxCanvas constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf eliminateTown}}(int town)  ]\par
eliminates the parameter town in the edge list\\
parameter town: number of town to eliminate
\item[  o  boolean \underline{{\bf isDouble}}(int index, int town)  ]\par
asks if there is a double connection to this town\\
parameter index: edge list index of the actual town\\
parameter town: town to test\\
return value: true for a double connection, otherwise false
\item[  o  boolean \underline{{\bf isOption}}(int index, int town)  ]\par
asks if the parameter town can be the next town in the trip\\
parameter index: the edge list index of the actual town\\
parameter town: town to test\\
return value: true if it can be, otherwise false
\item[  o  boolean \underline{{\bf isUsed}}(int town)  ]\par
asks if the town is already in the trip\\
parameter town: town to test\\
return  value: true if it is, otherwise false
\item[  o  void \underline{{\bf paint}}(Graphics g)  ]\par
redefines the paint method, implements double buffering\\
parameter g: java.awt.Graphics
\item[  o  void \underline{{\bf setData}}(TravelData data, int selectsize, int a, int b, int c, boolean d) ]\par 
sets the necessary data to draw this object\\
parameter {\bf TravelData}\\
parameter selectsize: number of selected individuals\\
parameter a: indicates if the towns should be labeled or not\\
parameter b: indicates the font size\\
parameter c: recombination method\\
parameter d: showtowns
\item[  o  void \underline{{\bf setRecomb}}(Individual parent1, Individual parent2, Individual ]\par {\bf child)}
  sets the parents and the child to be drawn\\
parameter parent1: first parent\\
parameter parent2: second parent\\
parameter child
\item[  o  void \underline{{\bf setStep}}(int step)  ]\par
  sets the next step of the crossover\\
parameter step: the next step
\item[  o  String \underline{{\bf toEdgeString}}(int nr, int{\char91}{\char93} list)  ]\par
  creates a representative string of the edge list of one town\\
parameter nr: number of entries in the edge list\\
parameter list: the edge list of one town\\
return value: string representation
\item[  o  String \underline{{\bf trimCoord}}(double dbl)  ]\par
adapts the coordinates to a fixed formatted string\\
parameter dbl: represents the coordinates\\
return value: string which represents the coordinates
\item[  o  void \underline{{\bf update}}(Graphics g)  ]\par
  redefines the update method for faster double buffering\\
parameter g: java.awt.Graphics
\end{description}

\subsection*{  Class PopCanvas}\label{popcanvas}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----PopCanvas

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf PopCanvas} extends Canvas implements MouseListener\\This class visualizes the actual population of the GA. 
%\\coding:   h.sarg \\modified: 01\slash 98
\end{description}

\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf PopCanvas}}()  ]\par
  PopCanvas constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  boolean \underline{{\bf checkFrames}}()  ]\par
  checks if there are invalid frames stored\\
return value: true if there is a free place in the array
\item[  o  void \underline{{\bf disposeFrames}}()  ]\par
disposes all TripFrames and is called before the parent window is closed
\item[  o  void \underline{{\bf mouseClicked}}(MouseEvent e)  ]\par
Double clicking the string representation of an individual creates a TripFrame. This frame shows this individual in detail.\\
parameter e: java.awt.event.MouseEvent
\item[  o  void \underline{{\bf paint}}(Graphics g)  ]\par
  redefines the paint method, implements double buffering\\
parameter g: java.awt.Graphics
\item[  o  void \underline{{\bf setPop}}(Population pop)  ]\par
  sets the population to be drawn\\
parameter pop {\bf Population}
\item[  o  void \underline{{\bf setPopData}}(ScrollPane s, int popsize, TravelData a, boolean b, ]\par {\bf int c, int grid)}
sets the necessary data to draw this object\\
parameter s: pointer to the scrollpane\\
parameter popsize: population size\\
parameter a {\bf TravelData}\\
parameter b: indicates if the towns should be labeled or not\\
parameter c: indicates the font size\\
parameter grid: grid size
\item[  o  void \underline{{\bf update}}(Graphics g)  ]\par
  redefines the update method for faster double buffering\\
parameter g: java.awt.Graphics 
\end{description}
\subsection*{  Class RecombCanvas}\label{recombcanvas}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----RecombCanvas

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf RecombCanvas}   extends Canvas   implements MouseListener\\This class visualizes the level of the actual generation. 
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf RecombCanvas}}()  ]\par
  RecombCanvas constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  boolean \underline{{\bf checkFrames}}()  ]\par
  checks if there are invalid frames stored\\
return value: true if there is a free place in the array
\item[  o  void \underline{{\bf disposeFrames}}()  ]\par
disposes all TripFrames and is called before the parent window is closed
\item[  o  void \underline{{\bf mouseClicked}}(MouseEvent e)  ]\par
Double clicking the string representation of an individual creates a TripFrame.
 This frame shows this individual in detail.\\
parameter e: java.awt.event.MouseEvent
\item[  o  void \underline{{\bf paint}}(Graphics g)  ]\par
  redefines the paint method, implements double buffering\\
parameter g: java.awt.Graphics
\item[  o  void \underline{{\bf setMut}}(Population pop)  ]\par
  sets the mutated population to be drawn\\
parameter pop {\bf Population}
\item[  o  void \underline{{\bf setPop}}(Population pop)  ]\par
  sets the recombinated population to be drawn\\
parameter pop {\bf Population}
\item[  o  void \underline{{\bf setRecombData}}(ScrollPane s, int ps, int ss, TravelData a, boolean b,  ]\par {\bf int c, int grid, int mm)}
sets the necessary data to drawing object\\
parameter s: pointer to the scrollpane\\
parameter ps: population size\\
parameter ss: selection size\\
parameter a {\bf TravelData}\\
parameter b: indicates if the towns should be labeled or not\\
parameter c: indicates the font size\\
parameter grid: grid size\\
parameter mm: mutation method
\item[  o  void \underline{{\bf setSelection}}(Individual{\char91}{\char93} indiv)  ]\par
  sets the selected individuals to be drawn\\
parameter indiv {\bf Individual}
\item[  o  void \underline{{\bf update}}(Graphics g)  ]\par
  redefines the update method for faster double buffering\\
parameter g: java.awt.Graphics
\end{description}
\subsection*{  Class StatisticCanvas}\label{statisticcanvas}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----StatisticCanvas

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf StatisticCanvas}   extends Canvas\\This class shows the statistic of best and mean values through all generations of the GA.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf StatisticCanvas}}()  ]\par
  StatisticCanvas constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf clear}}()  ]\par
clears all entries in the best and mean vectors, resets the length of the canvas
\item[  o  Vector \underline{{\bf getBest}}()  ]\par
  gets the statistic vector of the best individuals each generation\\
return value: statistic best vector
\item[  o  Vector \underline{{\bf getMean}}()  ]\par
  gets the statistic vector of the mean individuals each generation\\
return value: statistic mean vector
\item[  o  void \underline{{\bf paint}}(Graphics g)  ]\par
redefines the paint method, implements double buffering\\
parameter g: java.awt.Graphics
\item[  o  void \underline{{\bf setChanged}}()  ]\par
sets the new size of the canvas
\item[  o  void \underline{{\bf setData}}(ScrollPane s)  ]\par
sets the scrollpane data\\
parameter s: the associated scrollpane
\item[  o  void \underline{{\bf setValues}}(double best, double mv)  ]\par
stores the best and mean values of each generation in vectors\\
parameter best: best fitness\\
parameter mv: mean fitness
\item[  o  \underline{{\bf update}}(Graphics g)  ]\par
  redefines the update method for faster double buffering\\
parameter g: java.awt.Graphics
\end{description}
\newpage
\subsection*{  Class StringCanvas}\label{stringcanvas}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----StringCanvas

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf StringCanvas}   extends Canvas\\This class visualizes the recombination method if PMX, OX, CX or UOBX is selected.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf StringCanvas}}()  ]\par
  StringCanvas constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf paint}}(Graphics g)  ]\par
  redefines the paint method, implements double buffering\\
parameter g: java.awt.Graphics
\item[  o  void \underline{{\bf setData}}(int selectsize, int a, int b, int c)  ]\par
sets the necessary data and the child to draw this object\\
parameter selectsize: number of selected individuals\\
parameter a: number of towns\\
parameter b: indicates the font size\\
parameter c: recombination method
\item[  o  void \underline{{\bf setRecomb}}(Individual parent1, Individual parent2, Individual ]\par {\bf child)}
sets the parents and the child to be drawn\\
parameter parent1: first parent\\
parameter parent2: second parent\\
parameter child
\item[  o  void \underline{{\bf setStep}}(int step)  ]\par
sets the next step of the crossover\\
parameter step: the next step
\item[  o  void \underline{{\bf update}}(Graphics g)  ]\par
  redefines the update method for faster double buffering\\
parameter g: java.awt.Graphics
\end{description}
\subsection*{  Class TownCanvas}\label{towncanvas}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----TownCanvas

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf TownCanvas}   extends Canvas   implements MouseListener\\This class visualizes the selection of the towns with the mouse.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf TownCanvas}}()  ]\par
  TownCanvas constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf clearTownCanvas}}()  ]\par
clears all towns set till now
\item[  o  {int[]} \underline{{\bf getTownArray}}()  ]\par
  gets the actual townarray\\
return value: townarray
\item[  o  int \underline{{\bf getTowns}}()  ]\par
checks the townarray\\
return value: number of entries in the townarray
\item[  o  void \underline{{\bf mouseClicked}}(MouseEvent e)  ]\par
Clicking to a position in the canvas sets the corresponding town. Is this town already set then the click removes it.\\
parameter e: java.awt.event.MouseEvent
\item[  o  void \underline{{\bf paint}}(Graphics g)  ]\par
  redefines the paint method, implements double buffering\\
parameter g: java.awt.Graphics
\item[  o  void \underline{{\bf setTownCanvas}}(int a, int b)  ]\par
  sets the actual measurement of the canvas\\
parameter a: x value, scaled by grid\\
parameter b: y value, scaled by grid
\item[  o  void \underline{{\bf setTownData}}(int{\char91}{\char93}{\char91}{\char93} a, int b)  ]\par
gets towns from the DialogData object and makes a copy of them\\
parameter a: array of towns\\
parameter b: grid
\item[  o  void \underline{{\bf setTownsRandom}}(int a)  ]\par
  adds towns randomly to the existing problem\\  
parameter a: number of towns to add
\item[  o  void \underline{{\bf update}}(Graphics g)  ]\par
  redefines the update method for faster double buffering\\
parameter g: java.awt.Graphics
\end{description}
\subsection*{  Class TravelCanvas}\label{travelcanvas}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----TravelCanvas

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf TravelCanvas}  extends Canvas\\This class visualizes the trip representated by one individual.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf TravelCanvas}}()  ]\par
TravelCanvas constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf paint}}(Graphics g)  ]\par
  redefines the paint method, implements double buffering\\
parameter g: java.awt.Graphics
\item[  o  void \underline{{\bf setTravelCanvas}}(int a, int b)  ]\par
sets the actual measurement of the canvas\\
parameter a: x value, scaled by grid\\
parameter b: y value, scaled by grid
\item[  o  void \underline{{\bf setTravelData}}(TravelData a, boolean b, int c)  ]\par
sets the necessary data to draw this object\\
parameter a: {\bf TravelData}\\
parameter b: indicates if the towns should be labeled or not\\
parameter c: indicates the font size\\
\item[  o  void \underline{{\bf setTravelIndiv}}(Individual)  ]\par
sets an individual for which the trip is shown\\
parameter indiv {\bf Individual}
\item[  o  void \underline{{\bf update}}(Graphics g)  ]\par
  redefines the update method for faster double buffering\\
parameter g: java.awt.Graphics
\end{description}
\subsection*{  Class TSPGA}\label{tspga}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----TSPGA

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf TSPGA}   extends Applet   implements ActionListener, ItemListener, AdjustmentListener, WindowListener, ComponentListener, Runnable,\newline \underline{ResultProcessor}\\This class includes the main class and handels the dialogs and frames.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf TSPGA}}()  ]\par
TSPGA constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf actionPerformed}}(ActionEvent e)  ]\par
  Method to handle events for the ActionListener interface.\\
parameter e: java.awt.event.ActionEvent  
\item[  o  void \underline{{\bf adjustmentValueChanged}}(AdjustmentEvent e)  ]\par
  Method to handle events for the AdjustmentListener interface.\\
parameter e: java.awt.event.AdjustmentEvent  
\item[  o  boolean \underline{{\bf checkFrames}}()  ]\par
  checks if there are invalid frames stored\\
return value: true if there is a free place in the array, otherwise false
\item[  o  void \underline{{\bf componentResized}}(ComponentEvent e)  ]\par
Method to handle events for the ComponentListener interface.\\
parameter e: java.awt.event.ComponentEvent
\item[  o  void \underline{{\bf disposeFrames}}()  ]\par
disposes all FinalFrames and is called before the parent window is closed or a new TSP is set
\item[  o  void \underline{{\bf init}}()  ]\par
  handles the Applet init method
\item[  o  void \underline{{\bf itemStateChanged}}(ItemEvent e)  ]\par
  Method to handle events for the ItemListener interface.\\
parameter e: java.awt.event.ItemEvent
\item[  o  void \underline{{\bf main}}(String{\char91}{\char93} args)  ]\par
  main entrypoint - starts here when it is run as an application\\
parameter args: {java.lang.String[]}
\item[  o  void \underline{{\bf processResult}}(Dialog source, Object result)  ]\par
  after successfull dialog the run thread gets started\\
parameter source: who initiates the dialog\\
parameter result: information about the dialog
\item[  o  void \underline{{\bf run}}()  ]\par
starts a thread, each loop is one generation, only the {\bf PopCanvas}, the {\bf StatisticCanvas} and the best {\bf TravelCanvas} are updated
\item[  o  void \underline{{\bf toStart}}()  ]\par
initializes the application to start a new GA
\item[  o  void \underline{{\bf windowClosing}}(WindowEvent e)  ]\par
  Method to handle events for the WindowListener interface.\\
parameter e: java.awt.event.WindowEvent
\end{description}
\subsection*{  Class AboutDialog}\label{aboutdialog}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----AboutDialog

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf AboutDialog}   extends Dialog   implements ActionListener, WindowListener\\This class is about the origin of this JAVA program.  This Dialog gets activated from the TSPGA frame.
%\\coding:  h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf AboutDialog}}(Frame)  ]\par
  AboutDialog constructor comment.  
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf actionPerformed}}(ActionEvent e)  ]\par
  Method to handle events for the ActionListener interface.\\
parameter e: java.awt.event.ActionEvent
\item[  o  void \underline{{\bf main}}(String{\char91}{\char93} args)  ]\par
  main entrypoint - starts here when it is run as an application\\
parameter args: {java.lang.String[]}
\item[  o  void \underline{{\bf windowClosing}}(WindowEvent e)  ]\par
  Method to handle events for the WindowListener interface.\\
parameter e: java.awt.event.WindowEvent
\end{description}
\subsection*{  Class RunDialog}\label{rundialog}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----RunDialog

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf RunDialog}   extends Dialog   implements ActionListener, WindowListener\\This class is to set generations and the update function. This dialog gets activiated from the TSPGA frame.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf RunDialog}}(Applet parent, ConnectInfo u)  ]\par
This Constructor initialzes the values in this dialog and stores the caller.\\
parameter parent {\bf TSPGA}\\
parameter u {\bf ConnectInfo}
\item[  o  \underline{{\bf RunDialog}}(Frame)  ]\par
RunDialog constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf actionPerformed}}(ActionEvent e)  ]\par
  Method to handle events for the ActionListener interface.\\
parameter e: java.awt.event.ActionEvent
\item[  o  void \underline{{\bf main}}(String{\char91}{\char93} args)  ]\par
  main entrypoint - starts here when it is run as an application\\
parameter args: {java.lang.String[]}
\item[  o  void \underline{{\bf windowClosing}}(WindowEvent e)  ]\par
  Method to handle events for the WindowListener interface.\\
parameter e: java.awt.event.WindowEvent
\end{description}
\subsection*{  Class FinalFrame}\label{finalframe}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----FinalFrame

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf FinalFrame}   extends Frame   implements WindowListener, ComponentListener\\This class shows the result of one GA run.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf FinalFrame}}()  ]\par
FinalFrame constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf componentResized}}(ComponentEvent e)  ]\par
Method to handle events for the ComponentListener interface.\\
parameter e: java.awt.event.ComponentEvent
\item[  o  void \underline{{\bf setData}}(DialogData data, TravelData trav, String a, String b, ]\par {\bf String c, String d, Vector v1, Vector v2, Individual indiv)}
sets the necessary data of one GA run\\
parameter data: {\bf DialogData}\\
parameter trav: {\bf TravelData}\\
parameter a: best fitness\\
parameter b: mean fitness\\
parameter c: number of generations\\
parameter d: best trip\\
parameter v1: best fitness entries / generation\\
parameter v2: mean fitness entries / generation\\
parameter indiv: best {\bf Individual}
\item[  o  void \underline{{\bf windowClosing}}(WindowEvent e)  ]\par
  Method to handle events for the WindowListener interface.\\
parameter e: java.awt.event.WindowEvent
\end{description}
\subsection*{  Class TripFrame}\label{tripframe}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----TripFrame

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf TripFrame}   extends Frame   implements WindowListener, ComponentListener\\This class shows the trip representated by an individual and its fitness.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf TripFrame}}()  ]\par
TripFrame constructor comment.
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf componentResized}}(ComponentEvent e)  ]\par
Method to handle events for the ComponentListener interface.\\
parameter e: java.awt.event.ComponentEvent
\item[  o  void \underline{{\bf setData}}(Individual indiv, TravelData a, boolean b, int c, int grid)  ]\par
sets the individual to draw and the necessary data for the TravelCanvas\\
parameter indiv: {\bf Individual}\\
parameter a: {\bf TravelData}\\
parameter b: indicates if the towns should be labeled or not\\
parameter c: indicates the font size\\
parameter grid: grid size
\item[  o  void \underline{{\bf windowClosing}}(WindowEvent e)  ]\par
  Method to handle events for the WindowListener interface.\\
parameter e: java.awt.event.WindowEvent
\end{description}
\subsection*{  Class IntTextField}\label{inttextfield}

\begin{alltt}

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.TextComponent
                   |
                   +----java.awt.TextField
                           |
                           +----IntTextField

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf IntTextField}   extends TextField\\This class is an extension of the TextField. It allows input validation. \\(from ''core JAVA'', S.235 ff) 
%\\coding:   h.sarg \\modified: 10\slash 97

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf IntTextField}}(int def, int min, int max, int size)  ]\par
 This constructor sets the range of the acceptable values.\\
parameter def: default value\\
parameter min: minimal acceptable value\\
parameter max: maximal acceptable value\\
parameter size: length of integer input
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  int \underline{{\bf getValue}}()  ]\par
gets the value of the IntTextField after checking its input\\
return value: the Integer value
\item[  o  boolean \underline{{\bf isValid}}()  ]\par
  checks the input in the IntTextField\\
return value: true if input is ok, otherwise false
\end{description}
\subsection*{  Class ConnectInfo}\label{connectinfo}

\begin{alltt}

java.lang.Object
   |
   +----ConnectInfo

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf ConnectInfo}   extends Object\\This class contains the information for the {\bf RunDialog}. 
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Variable Index}

\begin{description}
  
\item[  o  boolean \underline{{\bf ok}}  ]\par
  true means update the StatisticCanvas every generation, else not 
\item[  o  int \underline{{\bf value}}  ]\par
number of generations the thread should run
\end{description}
\subsection*{  Class DialogData}\label{dialogdata}

\begin{alltt}

java.lang.Object
   |
   +----DialogData

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf DialogData}   extends Object\\This class includes all parameters for the GA and the TSP, and it contains all adjustable values out of the menu ''Options'') 
%\\coding: hannes sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Variable Index}

\begin{description}
  
\item[  o  boolean \underline{{\bf DEF\_ELITISM}}  ]\par
default value for the elitism, if true the best individual is kept
\item[  o  int \underline{{\bf DEF\_GRID}}  ]\par
default value for the grid (valid range: $10 - 100$)
\item[  o  int \underline{{\bf DEF\_GROUP}}  ]\par
default value for the tournament selection\\(valid range: $1 - 10$)
\item[  o  int \underline{{\bf DEF\_MM}}  ]\par
  default value for the mutation method\\(0 Inversion,  1 Insertion,   2 Displacement,  3 Swap,  4 None).  
\item[  o  int \underline{{\bf DEF\_MP}}  ]\par
  default value for the mutation probability (valid range: $0 - 100$)
\item[  o  int \underline{{\bf DEF\_POP}}  ]\par
default value for the poulation size (valid range: $5 - 100$)
\item[  o  int \underline{{\bf DEF\_RM}}  ]\par
  default value for the recombination method (0 PMX,  1 OX,   2 CX,  3 UOBX,  4 ERX,  5 ERX nach Grefenstette,  6 None).  
\item[  o  int \underline{{\bf DEF\_RP}}  ]\par
  default value for the recombination probability\\(valid range: $0 - 100$)  
\item[  o  int \underline{{\bf DEF\_TOWNS}}  ]\par
default value for number of towns (valid range: $4 - 100$)
\item[  o  boolean \underline{{\bf elitism}}  ]\par
  actual elitism  
\item[  o  int \underline{{\bf genstep}}  ]\par
  actual generationstep in RunDialog  
\item[  o  int \underline{{\bf grid}}  ]\par
actual grid, adjustable between 10 and 100
\item[  o  int \underline{{\bf group}}  ]\par
  actual group size, adjustable between 1 and 10  
\item[  o  boolean \underline{{\bf hold}}  ]\par
  actual hold value  
\item[  o  int \underline{{\bf largefonts}}  ]\par
  actual fonts: 0=small, 1=medium, 2=large  
\item[  o  int \underline{{\bf mm}}  ]\par
  actual mutation method, adjustable between 0 and 4
\item[  o  int \underline{{\bf mp}}  ]\par
  actual mutation probability, adjustable between 0 and 100  
\item[  o  int \underline{{\bf pop}}  ]\par
  actual population size, adjustable between 5 and 100
\item[  o  int \underline{{\bf rm}}  ]\par
  actual recombination method, adjustable between 0 and 6
\item[  o  int \underline{{\bf rp}}  ]\par
  actual recombination probability, adjustable between 0 and 100
\item[  o  boolean \underline{{\bf showtowns}}  ]\par
indicate towns with letters (A-Z) or show only their position
\item[  o  {int[][]} \underline{{\bf townarray}}  ]\par
  actual position of towns  
\item[  o  int \underline{{\bf towns}}  ]\par
  actual number of towns, adjustable between 4 and 100
\item[  o  boolean \underline{{\bf update}}  ]\par
  actual update in StatisticCanvas
\end{description}
\subsection*{  Class Individual}\label{individual}

\begin{alltt}

java.lang.Object
   |
   +----Individual

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf Individual}  extends Object\\This class defines an individual for the GA. Any individual may contain an object ({\bf VisRecomb}) which stores information about its parents. It contains also two mutation markers to make a visualization possible. This class has also some functions to visualize the data of an individual in different ways. A random initializer is implemented. \\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf Individual}}(int size)  ]\par
This constructor creates an individual and initializes its fields.\\
parameter size: length of the genstring (also: number of towns)
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf copyIndiv}}(Individual a)  ]\par
makes a copy of the necessary values of one individual\\
parameter a: {\bf Individual} to copy
\item[  o  void \underline{{\bf delVisRecomb}}()  ]\par
deletes the information about the parents of one individual
\item[  o  double \underline{{\bf getFitness}}()  ]\par
  gets the fitness of this individual\\
return value: fitness
\item[  o  int \underline{{\bf getGen}}(int gen)  ]\par
  gets the specified gen\\
parameter gen: number of gen\\
return value: value of gen
\item[  o  int \underline{{\bf getMut1}}()  ]\par
  gets the mutation marker\\
return value: position of mutation
\item[  o  int \underline{{\bf getMut2}}()  ]\par
  gets the mutation marker\\
return value: position of mutation
\item[  o  int \underline{{\bf getNr}}()  ]\par
  gets the number of this individual\\
return value: number of individual
\item[  o  VisRecomb \underline{{\bf getVisRecomb}}()  ]\par
gets the object which contains the information about the parents\\
return value: {\bf VisRecomb}
\item[  o  void \underline{{\bf initialize}}()  ]\par
  random initialisation of the individual  
\item[  o  boolean \underline{{\bf isBest}}()  ]\par
  tests this individual if it is the best of the last generation (elitism: true)\\
return value: true if it is the best, otherwise false
\item[  o  void \underline{{\bf setBest}}(boolean a)  ]\par
  sets the best value\\
parameter a: true if it is the best, otherwise false
\item[  o  void \underline{{\bf setFitness}}(double fit)  ]\par
  sets the fitness of this individual\\
parameter fit: fitness
\item[  o  void \underline{{\bf setGen}}(int gen, int value)  ]\par
  sets the specified gen\\
parameter gen: which gen\\
parameter value: value to set
\item[  o  \underline{{\bf setMut}}(int a, int b)  ]\par
  sets the values for the mutation markers\\
parameter a: first position of mutation\\
parameter b: second position of mutation
\item[  o  void \underline{{\bf setNr}}(int a)  ]\par
  sets the number of individual\\
parameter a: number of individual
\item[  o  void \underline{{\bf setVisRecomb}}()  ]\par
stores all information about the recombination which is only used when the user wants to simulate the functionality of the crossover method, creates this object
\item[  o  String \underline{{\bf toLabelString}}()  ]\par
  creates a string which represents the gen array without the number\\
return value: String
\item[  o  String \underline{{\bf toPopString}}(boolean fit)  ]\par
  creates a string which represents the gen array\\
parameter fit: string should contain fitness or not\\
return value: String
\item[  o  String \underline{{\bf toString}}()  ]\par
  creates a string which represents the individual data (testtool)\\
return value: String
\item[  o  String \underline{{\bf trimFit}}()  ]\par
adapts the fitness to a fixed (XXXX.XXX) formatted size
\end{description}
\subsection*{  Class Population}\label{popul}

\begin{alltt}

java.lang.Object
   |
   +----Population

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf Population}   extends Object\\This class represents a population for the GA. It also contains the fitness function and a quicksort algorithm to sort the individuals. 
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf Population}}(TravelData travel, int popsize, int size, int init)  ]\par
This constructor creates a new population.\\
parameter travel {\bf TravelData}\\
parameter popsize: population size\\
parameter size: number of towns\\
parameter init: indicates if the population should be initialized
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  void \underline{{\bf evaluate}}()  ]\par
  evaluates this population, evaluates the best fitness
\item[  o  Individual \underline{{\bf getBest}}()  ]\par
  gets the best individual in this population\\
return value: {\bf Individual}
\item[  o double \underline{{\bf getBestFit}}()  ]\par
  gets the best fitness in this population\\
return value: best fitness
\item[  o  Individual \underline{{\bf getIndiv}}(int)  ]\par
  gets the specified individual\\
return value: {\bf Individual}
\item[  o  double \underline{{\bf getMeanFit}}()  ]\par
  gets the mean fitness in this population\\
return value: mean fitness
\item[  o  void \underline{{\bf qsort}}()  ]\par
  interface to the quicksort algorithm to determine the number of the individuals and to get the mean value   
\item[  o  void \underline{{\bf quicksort}}(int lo0, int hi0)  ]\par
 This  quicksort algorithm will handle arrays that are already sorted and arrays with duplicate keys.\\
parameter lo0: left boundary of array partition\\
parameter hi0: right boundary of array partition
\end{description}
\subsection*{  Class TravelData}\label{traveldata}

\begin{alltt}

java.lang.Object
   |
   +----TravelData

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf TravelData}   extends Object\\This class contains the information about the towns and their distances.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf TravelData}}(DialogData data)  ]\par
This constructor creates the towns by random or uses the user-selected towns. Also the distances between the towns are calculated.\\
parameter data {\bf DialogData}
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  double \underline{{\bf distance}}(int a, int b)  ]\par
  gets the distance between two towns\\
parameter a: first town\\
parameter b: second town\\
return value: distance between towns
\item[  o  {int[][]} \underline{{\bf getCoord}}()  ]\par
  gets the coordinates of the towns\\
return value: coordinates of the towns 
\item[  o  int \underline{{\bf getGrid}}()  ]\par
  gets the grid\\
return value: grid size
\item[  o  int \underline{{\bf getTownSize}}()  ]\par
  gets the number of towns\\
return value: number of towns
\item[  o  void \underline{{\bf initArray}}()  ]\par
  initializes an array with 0  
\item[  o  String \underline{{\bf toString}}()  ]\par
  creates a string which represents the information of this class\\
return value: String
\end{description}
\subsection*{  Class VisRecomb}\label{visrecomb}

\begin{alltt}

java.lang.Object
   |
   +----VisRecomb

\end{alltt}
\par
\hbox to \linewidth{\hrulefill}
\par

\begin{description}
  
\item public class {\bf VisRecomb}   extends Object\\This class contains information about the recombination of two individuals.
%\\coding:   h.sarg \\modified: 01\slash 98

\end{description}
\par
\hbox to \linewidth{\hrulefill}
\par

\subsubsection*{  Constructor Index}

\begin{description}
  
\item[  o  \underline{{\bf VisRecomb}}(int towns)  ]\par
  This constructor creates an object and initializes its fields.\\
parameter towns: number of towns 
\end{description}


\subsubsection*{  Method Index}

\begin{description}
  
\item[  o  int \underline{{\bf getCoEnd}}()  ]\par
  gets the end of the crossover area\\
return value: end of the crossover area
\item[  o  int \underline{{\bf getCoStart}}()  ]\par
  gets the start of the crossover area\\
return value: start of the crossover area
\item[  o  {int[][]} \underline{{\bf getEdges}}()  ]\par
  gets the edge list for the visualisation of the Erx and Erx with Heuristic\\
return value: edge list
\item[  o  int \underline{{\bf getInfo}}(int a)  ]\par
  gets the stored information about this gen\\
parameter a: position of the gen\\
return value: the information about the gen set in the crossover
\item[  o  int \underline{{\bf getMaxStep}}()  ]\par
  gets the maximum step value of the crossover\\
return value: maximum step value
\item[  o  int \underline{{\bf getStep}}(int a)  ]\par
 gets the step value when this gen was set in the crossover\\
parameter a: position of the gen\\
return value: the step when the gen was set in the crossover
\item[  o  void \underline{{\bf setCoArea}}(int a, int b)  ]\par
  stores the border of the crossover area\\
parameter a: begin\\
parameter b: end
\item[  o  void \underline{{\bf setEdges}}(int{\char91}{\char93}{\char91}{\char93} a)  ]\par
makes a copy from the parameter edge list and stores it only for the visualisation of the ERX and ERX with heuristic\\
parameter a: edge list
\item[  o  void \underline{{\bf setInfo}}(int a, int b)  ]\par
  stores information about a gen\\
parameter a: position in the list\\
parameter b: information about the gen
\item[  o  void \underline{{\bf setMaxStep}}(int a)  ]\par
  sets the maximum step value of the crossover\\
parameter a: maximum step value
\item[  o  void \underline{{\bf setStep}}(int a, int b)  ]\par
stores the step value when this gen is set in the crossover\\
parameter a: position in the list\\
parameter b: step value
\item[  o  String \underline{{\bf toString}}()  ]\par
  creates a string which represents this object\\
return value: String
\end{description}

\normalsize

