Package ec.util

Examples of ec.util.Parameter


                {
                public void keyPressed(KeyEvent e)
                    {
                    if (e.getKeyCode() == KeyEvent.VK_ENTER)
                        {
                        console.parameters.set(new Parameter(EvolutionState.P_GENERATIONS), ((JTextField)e.getSource()).getText());
                        }
                    else if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
                        {
                        ((JTextField)e.getSource()).setText(console.parameters.getString(new Parameter(EvolutionState.P_GENERATIONS),null));
                        }
                    }
                });
            }
        return numGensField;
View Full Code Here


            quitOnRunCompleteCheckbox.setText("Quit on Run Complete");
            quitOnRunCompleteCheckbox.addItemListener(new java.awt.event.ItemListener()
                {
                public void itemStateChanged(java.awt.event.ItemEvent e)
                    {   
                    console.parameters.set(new Parameter(EvolutionState.P_QUITONRUNCOMPLETE),
                        "" + ((JCheckBox)e.getSource()).isSelected());
                    }
                });
            }
        return quitOnRunCompleteCheckbox;
View Full Code Here

    public static final String P_SIMPLE = "simple";

    /** Returns the default base. */
    public static final Parameter base()
        {
        return new Parameter(P_SIMPLE);
        }
View Full Code Here

            int i = 0;
            for (int thread = 0; thread < numThreads; ++thread)
                {
                try
                    {
                    seed = console.parameters.getInt(new Parameter("seed."+thread),null);
                    }
                catch (NumberFormatException ex)
                    {
                    seed = getSeed(0,thread-1)+1;
                    }
                for (int job = 0; job < numJobs; ++job)
                    setSeed(""+(seed+(i++)),job,thread);
                }
            }
        else
            {
            for (int job = 0; job < numJobs; ++job)
                {
                for (int thread = 0; thread < numThreads; ++thread)
                    {
                    setSeed(console.parameters.getString(new Parameter("seed."+thread),null),job,thread);
                    }
                }
            }
        }
View Full Code Here

                {
                public void keyPressed(java.awt.event.KeyEvent e)
                    {
                    if (e.getKeyCode() == KeyEvent.VK_ENTER)
                        {
                        console.parameters.set(new Parameter(Evolve.P_EVALTHREADS), ((JTextField)e.getSource()).getText());
                        resizeSeedTable();
                        }
                    else if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
                        {
                        ((JTextField)e.getSource()).setText(console.parameters.getString(new Parameter(Evolve.P_EVALTHREADS),null));
                        }
                    }
                });
            }
        return evalThreadsField;
View Full Code Here

                {
                public void keyPressed(java.awt.event.KeyEvent e)
                    {   
                    if (e.getKeyCode() == KeyEvent.VK_ENTER)
                        {
                        console.parameters.set(new Parameter(Evolve.P_BREEDTHREADS), ((JTextField)e.getSource()).getText());
                        resizeSeedTable();
                        }
                    else if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
                        {
                        ((JTextField)e.getSource()).setText(console.parameters.getString(new Parameter(Evolve.P_BREEDTHREADS),null));
                        }
                    }
                });
            }
        return breedThreadsField;
View Full Code Here

                    else
                        {
                        setEnabled(checkpointPanel, false);
                        }
                   
                    console.parameters.set(new Parameter(EvolutionState.P_CHECKPOINT),"" + ((JCheckBox)e.getSource()).isSelected());
                    }
                });
            }
        return checkpointCheckBox;
        }
View Full Code Here

        return p;
        }
               
    public Population setupPopulation(final EvolutionState state, int thread)
        {
        Parameter base = new Parameter(P_POP);
        Population p = (Population) state.parameters.getInstanceForParameterEq(base,null,Population.class)// Population.class is fine
        p.setup(state,base);
        return p;
        }
View Full Code Here

                {
                public void keyPressed(java.awt.event.KeyEvent e)
                    {   
                    if (e.getKeyCode() == KeyEvent.VK_ENTER)
                        {
                        console.parameters.set(new Parameter(EvolutionState.P_CHECKPOINTMODULO), ((JTextField)e.getSource()).getText());
                        }
                    else if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
                        {
                        ((JTextField)e.getSource()).setText(console.parameters.getString(new Parameter(EvolutionState.P_CHECKPOINTMODULO),null));
                        }
                    }
                });
            }
        return checkpointModuloField;
View Full Code Here

                {
                public void keyPressed(java.awt.event.KeyEvent e)
                    {   
                    if (e.getKeyCode() == KeyEvent.VK_ENTER)
                        {
                        console.parameters.set(new Parameter(EvolutionState.P_CHECKPOINTPREFIX), ((JTextField)e.getSource()).getText());
                        }
                    else if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
                        {
                        ((JTextField)e.getSource()).setText(console.parameters.getString(new Parameter(EvolutionState.P_CHECKPOINTPREFIX),null));
                        }
                    }
                });
            }
        return prefixField;
View Full Code Here

TOP

Related Classes of ec.util.Parameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.