Java Doc for CrossoverOperator.java in  » Development » jgap » org » jgap » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Development » jgap » org.jgap.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jgap.BaseGeneticOperator
      org.jgap.impl.CrossoverOperator

CrossoverOperator
public class CrossoverOperator extends BaseGeneticOperator implements Comparable(Code)
The crossover operator randomly selects two Chromosomes from the population and "mates" them by randomly picking a gene and then swapping that gene and all subsequent genes between the two Chromosomes. The two modified Chromosomes are then added to the list of candidate Chromosomes. If you work with CompositeGene's, this operator expects them to contain genes of the same type (e.g. IntegerGene). If you have mixed types, please provide your own crossover operator. This CrossoverOperator supports both fixed and dynamic crossover rates. A fixed rate is one specified at construction time by the user. This operation is performed 1/m_crossoverRate as many times as there are Chromosomes in the population. Another possibility is giving the crossover rate as a percentage. A dynamic rate is one determined by this class on the fly if no fixed rate is provided.
author:
   Neil Rotstan
author:
   Klaus Meffert
author:
   Chris Knowles
since:
   1.0



Constructor Summary
public  CrossoverOperator()
     Constructs a new instance of this CrossoverOperator without a specified crossover rate, this results in dynamic crossover rate being turned off.
public  CrossoverOperator(Configuration a_configuration)
     Constructs a new instance of this CrossoverOperator without a specified crossover rate, this results in dynamic crossover rate being turned off.
public  CrossoverOperator(Configuration a_configuration, IUniversalRateCalculator a_crossoverRateCalculator)
     Constructs a new instance of this CrossoverOperator with a specified crossover rate calculator, which results in dynamic crossover being turned on.
public  CrossoverOperator(Configuration a_configuration, IUniversalRateCalculator a_crossoverRateCalculator, boolean a_allowFullCrossOver)
     Constructs a new instance of this CrossoverOperator with a specified crossover rate calculator, which results in dynamic crossover being turned on.
public  CrossoverOperator(Configuration a_configuration, int a_desiredCrossoverRate)
     Constructs a new instance of this CrossoverOperator with the given crossover rate.
public  CrossoverOperator(Configuration a_configuration, int a_desiredCrossoverRate, boolean a_allowFullCrossOver)
     Constructs a new instance of this CrossoverOperator with the given crossover rate.
public  CrossoverOperator(Configuration a_configuration, int a_desiredCrossoverRate, boolean a_allowFullCrossOver, boolean a_xoverNewAge)
     Constructs a new instance of this CrossoverOperator with the given crossover rate.
public  CrossoverOperator(Configuration a_configuration, double a_crossoverRatePercentage)
     Constructs a new instance of this CrossoverOperator with the given crossover rate.
public  CrossoverOperator(Configuration a_configuration, double a_crossoverRatePercentage, boolean a_allowFullCrossOver)
     Constructs a new instance of this CrossoverOperator with the given crossover rate.
public  CrossoverOperator(Configuration a_configuration, double a_crossoverRatePercentage, boolean a_allowFullCrossOver, boolean a_xoverNewAge)
     Constructs a new instance of this CrossoverOperator with the given crossover rate.

Method Summary
public  intcompareTo(Object a_other)
     Compares the given object to this one.
public  intgetCrossOverRate()
    
public  doublegetCrossOverRatePercent()
    
protected  voidinit()
     Initializes certain parameters.
public  booleanisAllowFullCrossOver()
    
public  booleanisXoverNewAge()
    
public  voidoperate(Population a_population, List a_candidateChromosomes)
     Does the crossing over.
public  voidsetAllowFullCrossOver(boolean a_allowFullXOver)
    
public  voidsetXoverNewAge(boolean a_xoverNewAge)
    


Constructor Detail
CrossoverOperator
public CrossoverOperator() throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator without a specified crossover rate, this results in dynamic crossover rate being turned off. This means that the crossover rate will be fixed at populationsize/2.

Attention: The configuration used is the one set with the static method Genotype.setConfiguration.
throws:
  InvalidConfigurationException -
author:
   Chris Knowles
since:
   2.0




CrossoverOperator
public CrossoverOperator(Configuration a_configuration) throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator without a specified crossover rate, this results in dynamic crossover rate being turned off. This means that the crossover rate will be fixed at populationsize/2.
Parameters:
  a_configuration - the configuration to use
throws:
  InvalidConfigurationException -
author:
   Klaus Meffert
since:
   3.0



CrossoverOperator
public CrossoverOperator(Configuration a_configuration, IUniversalRateCalculator a_crossoverRateCalculator) throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator with a specified crossover rate calculator, which results in dynamic crossover being turned on.
Parameters:
  a_configuration - the configuration to use
Parameters:
  a_crossoverRateCalculator - calculator for dynamic crossover ratecomputation
throws:
  InvalidConfigurationException -
author:
   Chris Knowles
author:
   Klaus Meffert
since:
   3.0 (since 2.0 without a_configuration)



CrossoverOperator
public CrossoverOperator(Configuration a_configuration, IUniversalRateCalculator a_crossoverRateCalculator, boolean a_allowFullCrossOver) throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator with a specified crossover rate calculator, which results in dynamic crossover being turned on.
Parameters:
  a_configuration - the configuration to use
Parameters:
  a_crossoverRateCalculator - calculator for dynamic crossover ratecomputation
Parameters:
  a_allowFullCrossOver - true: x-over before AND after x-over point,false: only x-over after x-over point
throws:
  InvalidConfigurationException -
author:
   Klaus Meffert
since:
   3.3.2



CrossoverOperator
public CrossoverOperator(Configuration a_configuration, int a_desiredCrossoverRate) throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator with the given crossover rate.
Parameters:
  a_configuration - the configuration to use
Parameters:
  a_desiredCrossoverRate - the desired rate of crossover
throws:
  InvalidConfigurationException -
author:
   Chris Knowles
author:
   Klaus Meffert
since:
   3.0 (since 2.0 without a_configuration)



CrossoverOperator
public CrossoverOperator(Configuration a_configuration, int a_desiredCrossoverRate, boolean a_allowFullCrossOver) throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator with the given crossover rate. No new chromosomes are x-overed.
Parameters:
  a_configuration - the configuration to use
Parameters:
  a_desiredCrossoverRate - the desired rate of crossover
Parameters:
  a_allowFullCrossOver - true: x-over before AND after x-over point,false: only x-over after x-over point
throws:
  InvalidConfigurationException -
author:
   Klaus Meffert
since:
   3.3.2



CrossoverOperator
public CrossoverOperator(Configuration a_configuration, int a_desiredCrossoverRate, boolean a_allowFullCrossOver, boolean a_xoverNewAge) throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator with the given crossover rate.
Parameters:
  a_configuration - the configuration to use
Parameters:
  a_desiredCrossoverRate - the desired rate of crossover
Parameters:
  a_allowFullCrossOver - true: x-over before AND after x-over point,false: only x-over after x-over point
throws:
  InvalidConfigurationException -
Parameters:
  a_xoverNewAge - true: also x-over chromosomes with age of zero (newlycreated chromosomes)
author:
   Klaus Meffert
since:
   3.3.2



CrossoverOperator
public CrossoverOperator(Configuration a_configuration, double a_crossoverRatePercentage) throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator with the given crossover rate. No new chromosomes are x-overed.
Parameters:
  a_configuration - the configuration to use
Parameters:
  a_crossoverRatePercentage - the desired rate of crossover inpercentage of the population
throws:
  InvalidConfigurationException -
author:
   Chris Knowles
author:
   Klaus Meffert
since:
   3.0 (since 2.0 without a_configuration)



CrossoverOperator
public CrossoverOperator(Configuration a_configuration, double a_crossoverRatePercentage, boolean a_allowFullCrossOver) throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator with the given crossover rate. No new chromosomes are x-overed.
Parameters:
  a_configuration - the configuration to use
Parameters:
  a_crossoverRatePercentage - the desired rate of crossover inpercentage of the population
Parameters:
  a_allowFullCrossOver - true: x-over before AND after x-over point,false: only x-over after x-over point
throws:
  InvalidConfigurationException -
author:
   Klaus Meffert
since:
   3.3.2.



CrossoverOperator
public CrossoverOperator(Configuration a_configuration, double a_crossoverRatePercentage, boolean a_allowFullCrossOver, boolean a_xoverNewAge) throws InvalidConfigurationException(Code)
Constructs a new instance of this CrossoverOperator with the given crossover rate.
Parameters:
  a_configuration - the configuration to use
Parameters:
  a_crossoverRatePercentage - the desired rate of crossover inpercentage of the population
Parameters:
  a_allowFullCrossOver - true: x-over before AND after x-over point,false: only x-over after x-over point
Parameters:
  a_xoverNewAge - true: also x-over chromosomes with age of zero (newlycreated chromosomes)
throws:
  InvalidConfigurationException -
author:
   Klaus Meffert
since:
   3.3.2.




Method Detail
compareTo
public int compareTo(Object a_other)(Code)
Compares the given object to this one.
Parameters:
  a_other - the instance against which to compare this instance a negative number if this instance is "less than" the giveninstance, zero if they are equal to each other, and a positive number ifthis is "greater than" the given instance
author:
   Klaus Meffert
since:
   2.6



getCrossOverRate
public int getCrossOverRate()(Code)
the crossover rate set
author:
   Klaus Meffert
since:
   3.3.2



getCrossOverRatePercent
public double getCrossOverRatePercent()(Code)
the crossover rate set
author:
   Klaus Meffert
since:
   3.3.2



init
protected void init()(Code)
Initializes certain parameters.
author:
   Klaus Meffert
since:
   3.3.2



isAllowFullCrossOver
public boolean isAllowFullCrossOver()(Code)
x-over before and after a randomly chosen x-over point
author:
   Klaus Meffert
since:
   3.3.2



isXoverNewAge
public boolean isXoverNewAge()(Code)
a_xoverNewAge true: also x-over chromosomes with age of zero (newlycreated chromosomes)
author:
   Klaus Meffert
since:
   3.3.2



operate
public void operate(Population a_population, List a_candidateChromosomes)(Code)
Does the crossing over.
Parameters:
  a_population - the population of chromosomes from the currentevolution prior to exposure to crossing over
Parameters:
  a_candidateChromosomes - the pool of chromosomes that have beenselected for the next evolved population
author:
   Neil Rotstan
author:
   Klaus Meffert
since:
   2.0



setAllowFullCrossOver
public void setAllowFullCrossOver(boolean a_allowFullXOver)(Code)

Parameters:
  a_allowFullXOver - x-over before and after a randomly chosen point
author:
   Klaus Meffert
since:
   3.3.2



setXoverNewAge
public void setXoverNewAge(boolean a_xoverNewAge)(Code)

Parameters:
  a_xoverNewAge - true: also x-over chromosomes with age of zero (newlycreated chromosomes)
author:
   Klaus Meffert
since:
   3.3.2



Methods inherited from org.jgap.BaseGeneticOperator
public boolean equals(Object a_other)(Code)(Java Doc)
public Configuration getConfiguration()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.