|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame orbital.moon.evolutionary.BreederControl
public class BreederControl
front-end for evolutionary algorithms.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Closer |
closer
|
protected CustomizerViewController |
custom
|
protected orbital.moon.evolutionary.PopulationTableModel |
data
|
static int |
defaultChildren
|
static double |
defaultMaxMutation
|
static double |
defaultMaxRecombination
|
static int |
defaultParents
default values |
protected java.io.File |
file
Current population file processed. |
protected GeneticAlgorithm |
ga
The current genetic algorithm. |
protected GeneticAlgorithmProblem |
problem
The current genetic algorithm problem to solve. |
protected java.util.logging.Logger |
protocol
Protocol written for current population. |
protected static java.util.ResourceBundle |
resources
Program resources. |
protected int |
startGeneration
|
protected java.util.Date |
startTime
|
protected java.util.Date |
stopTime
|
static java.lang.String |
usage
|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
BreederControl()
Construct a BreederControl frame. |
|
BreederControl(GeneticAlgorithmProblem problem)
Construct a BreederControl frame for solving the given problem. |
Method Summary | |
---|---|
void |
about()
|
static java.io.File |
changeExtension(java.io.File file,
java.lang.String extension)
Change the extension of a file name to a new one. |
protected GeneticAlgorithm |
create()
|
protected Genome |
createGenome()
Create a problem-specific genome prototype. |
protected java.awt.Component |
createStatusBar()
Create a status bar to display. |
void |
destroy()
|
protected void |
evolve()
Evolves and updates view. |
protected void |
exportGenome(Genome genome,
java.io.OutputStream os)
Save genome to export. |
void |
fileExit_actionPerformed(java.awt.event.ActionEvent e)
|
protected GeneticAlgorithm |
getGeneticAlgorithm()
Get the current genetic algorithm used for solving. |
protected GeneticAlgorithmProblem |
getGeneticAlgorithmProblem()
Get the current genetic algorithm problem to solve. |
protected int |
getInitialPopulationSize()
Get the desired initial population size from the user. |
protected java.io.InputStream |
getInputStream(java.io.File file)
Get an input stream for a file. |
protected java.io.OutputStream |
getOutputStream(java.io.File file)
Get an output stream for a file. |
protected java.util.ResourceBundle |
getResources()
Get program resources. |
protected java.lang.String |
getSelectedAlgorithmType()
Get the algorithm type selected. |
protected void |
history()
Store history file sequence. |
protected Genome |
importGenome(java.io.InputStream is)
Load genome to import. |
void |
init()
|
protected GeneticAlgorithm |
load(java.io.InputStream is)
Load population and genetic algorithm. |
static void |
main(java.lang.String[] arg)
tool-main |
protected void |
manipulate(Genome c)
|
protected void |
popEnable(boolean e)
Enable menu options etc. |
protected void |
properties(GeneticAlgorithm ga)
|
protected void |
protocol(java.lang.String text)
Protocolize a text. |
protected void |
ready()
Called when the breeder control is ready again. |
void |
run()
Runnable-start entry point. |
protected void |
save(GeneticAlgorithm ga,
java.io.OutputStream os)
Save population and genetic algorithm. |
protected void |
setGeneticAlgorithmProblem(GeneticAlgorithmProblem gap)
|
void |
start()
|
protected void |
statistics(GeneticAlgorithm ga)
|
void |
stop()
|
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static final int defaultParents
public static final int defaultChildren
public static final double defaultMaxRecombination
public static final double defaultMaxMutation
public static final java.lang.String usage
protected static final java.util.ResourceBundle resources
protected orbital.moon.evolutionary.PopulationTableModel data
protected final CustomizerViewController custom
protected Closer closer
protected java.util.Date startTime
protected java.util.Date stopTime
protected int startGeneration
protected java.io.File file
ga
protected java.util.logging.Logger protocol
ga
,
protocolHeader(GeneticAlgorithm)
,
protocolHandler
protected GeneticAlgorithmProblem problem
protected GeneticAlgorithm ga
Constructor Detail |
---|
public BreederControl(GeneticAlgorithmProblem problem)
public BreederControl()
Method Detail |
---|
public static void main(java.lang.String[] arg) throws java.lang.Exception
java.lang.Exception
protected java.util.ResourceBundle getResources()
protected final GeneticAlgorithmProblem getGeneticAlgorithmProblem()
problem
protected final void setGeneticAlgorithmProblem(GeneticAlgorithmProblem gap)
protected final GeneticAlgorithm getGeneticAlgorithm()
ga
protected Genome createGenome()
protected GeneticAlgorithm create() throws java.lang.InstantiationException
java.lang.InstantiationException
protected GeneticAlgorithm load(java.io.InputStream is) throws java.io.IOException, java.lang.ClassNotFoundException
Note: Remember that class names are relative to this package for serialization. If you desire your own package to be default, simply overwrite this method with the body
super.load(is);to circumvent confusion with different default packages.
java.io.IOException
java.lang.ClassNotFoundException
protected void save(GeneticAlgorithm ga, java.io.OutputStream os) throws java.io.IOException
java.io.IOException
protected void properties(GeneticAlgorithm ga)
protected Genome importGenome(java.io.InputStream is) throws java.io.IOException, java.lang.ClassNotFoundException
null
if it should not be inserted.
(either because it's invalid, or because it has already been inserted in a custom way).
java.io.IOException
java.lang.ClassNotFoundException
protected void exportGenome(Genome genome, java.io.OutputStream os) throws java.io.IOException
java.io.IOException
protected void manipulate(Genome c)
protected java.io.InputStream getInputStream(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
Overwrite to change the stream that data is read from.
java.io.FileNotFoundException
java.io.IOException
protected java.io.OutputStream getOutputStream(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
Overwrite to change the stream that data is written to.
java.io.FileNotFoundException
java.io.IOException
protected void statistics(GeneticAlgorithm ga)
protected void protocol(java.lang.String text)
protected void history()
public void start()
public void stop()
public void run()
run
in interface java.lang.Runnable
protected void ready()
protected int getInitialPopulationSize() throws java.lang.NumberFormatException
java.lang.NumberFormatException
public void init()
public void destroy()
protected void evolve()
protected void popEnable(boolean e)
e
- true to enable some menu options etc. because a population is present.
false to disable some menu options because no population is present.protected java.lang.String getSelectedAlgorithmType()
protected java.awt.Component createStatusBar()
public void fileExit_actionPerformed(java.awt.event.ActionEvent e)
public void about()
public static java.io.File changeExtension(java.io.File file, java.lang.String extension)
extension
- the new extension (without '.').
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |