Java Doc for BaseChromosome.java in  » Development » jgap » org » jgap » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jgap.BaseChromosome

All known Subclasses:   org.jgap.Chromosome,
BaseChromosome
abstract public class BaseChromosome implements IChromosome,IInitializer,IPersistentRepresentation,IBusinessKey(Code)
Base class for any implementation of interface IChromosome.
author:
   Klaus Meffert
since:
   3.0


Field Summary
final public static  StringCHROM_DELIMITER
     Separates chromosome-related information.
final public static  StringGENE_DELIMITER
     This field separates gene class name from the gene persistent representation string.
final public static  StringGENE_DELIMITER_CLOSING
     Represents the closing delimiter that is used to separate genes in the persistent representation of Chromosome instances.
final public static  StringGENE_DELIMITER_HEADING
     Represents the heading delimiter that is used to separate genes in the persistent representation of Chromosome instances.

Constructor Summary
public  BaseChromosome(Configuration a_configuration)
     The only constructor in this class.

Method Summary
abstract public  Objectclone()
     Creates and returns a copy of this object.
protected  GenecreateGene(String a_geneClassName, String a_persistentRepresentation)
     Creates a new Gene instance.

Taken from CompositeGene.

protected  Stringdecode(String a_string)
    
protected  Stringencode(String a_string)
    
public  intgetAge()
     0: Chromosome newly created in this generation.
public  StringgetBusinessKey()
    
public  ConfigurationgetConfiguration()
    
public synchronized  GenegetGene(int a_desiredLocus)
     Returns the Gene at the given index (locus) within the Chromosome.
public synchronized  Gene[]getGenes()
     Retrieves the set of genes that make up this Chromosome.
public  StringBuffergetGenesPersistentRepresentation()
    
public  voidgetGenesPersistentRepresentation(StringBuffer a_buffer)
    
public  StringgetPersistentRepresentation()
     Returns a persistent representation of this chromosome, see interface Gene for description.
public  voidincreaseAge()
     Increases the number of evolutionary rounds of chromosome in which it has not been changed by one.
public  voidincreaseOperatedOn()
     Increase information of number of genetic operations performed on chromosome in current evolution round.
public  intoperatedOn()
    
public  voidresetAge()
     Reset age of chromosome because it has been changed.
public  voidresetOperatedOn()
     Resets the information of how many genetic operators have been performed on the chromosome in the current round of evolution.
public  voidsetGene(int a_index, Gene a_gene)
    
public  voidsetGenes(Gene[] a_genes)
     Sets the genes for the chromosome.
public  voidsetValueFromPersistentRepresentation(String a_representation)
     Counterpart of getPersistentRepresentation.
public  intsize()
     Returns the size of this Chromosome (the number of genes it contains).
final protected static  Listsplit(String a_string)
     Splits the input a_string into individual gene representations.

Taken and adapted from CompositeGene.


Field Detail
CHROM_DELIMITER
final public static String CHROM_DELIMITER(Code)
Separates chromosome-related information.



GENE_DELIMITER
final public static String GENE_DELIMITER(Code)
This field separates gene class name from the gene persistent representation string. '*' does not work properly with URLEncoder!



GENE_DELIMITER_CLOSING
final public static String GENE_DELIMITER_CLOSING(Code)
Represents the closing delimiter that is used to separate genes in the persistent representation of Chromosome instances.



GENE_DELIMITER_HEADING
final public static String GENE_DELIMITER_HEADING(Code)
Represents the heading delimiter that is used to separate genes in the persistent representation of Chromosome instances.




Constructor Detail
BaseChromosome
public BaseChromosome(Configuration a_configuration) throws InvalidConfigurationException(Code)
The only constructor in this class. Sets the immutable configuration.
Parameters:
  a_configuration - the configuration to set
throws:
  InvalidConfigurationException - if configuration is null
author:
   Klaus Meffert
since:
   3.0




Method Detail
clone
abstract public Object clone()(Code)
Creates and returns a copy of this object. a clone of this instance
throws:
  IllegalStateException - instead of CloneNotSupportedException
author:
   Klaus Meffert
since:
   3.0



createGene
protected Gene createGene(String a_geneClassName, String a_persistentRepresentation) throws Exception(Code)
Creates a new Gene instance.

Taken from CompositeGene.
Parameters:
  a_geneClassName - name of the gene class
Parameters:
  a_persistentRepresentation - persistent representation of the gene tocreate (could be obtained via getPersistentRepresentation) newly created gene
throws:
  Exception -
author:
   Klaus Meffert
since:
   3.2




decode
protected String decode(String a_string) throws UnsupportedEncodingException(Code)



encode
protected String encode(String a_string)(Code)



getAge
public int getAge()(Code)
0: Chromosome newly created in this generation. This means itdoes not need being crossed over with another newly created one
author:
   Klaus Meffert
since:
   3.2



getBusinessKey
public String getBusinessKey()(Code)
business key of the chromosome
author:
   Klaus Meffert
since:
   3.2



getConfiguration
public Configuration getConfiguration()(Code)
the configuration used
author:
   Klaus Meffert
since:
   3.0



getGene
public synchronized Gene getGene(int a_desiredLocus)(Code)
Returns the Gene at the given index (locus) within the Chromosome. The first gene is at index zero and the last gene is at the index equal to the size of this Chromosome - 1.
Parameters:
  a_desiredLocus - index of the gene value to be returned Gene at the given index
author:
   Neil Rotstan
since:
   1.0



getGenes
public synchronized Gene[] getGenes()(Code)
Retrieves the set of genes that make up this Chromosome. This method exists primarily for the benefit of GeneticOperators that require the ability to manipulate Chromosomes at a low level. an array of the Genes contained within this Chromosome
author:
   Neil Rotstan
since:
   1.0



getGenesPersistentRepresentation
public StringBuffer getGenesPersistentRepresentation()(Code)



getGenesPersistentRepresentation
public void getGenesPersistentRepresentation(StringBuffer a_buffer)(Code)



getPersistentRepresentation
public String getPersistentRepresentation()(Code)
Returns a persistent representation of this chromosome, see interface Gene for description. Similar to CompositeGene's routine. But does not include all information of the chromosome (yet). string representation of this Chromosome's relevant parts of itscurrent state
throws:
  UnsupportedOperationException -
author:
   Klaus Meffert
since:
   3.2



increaseAge
public void increaseAge()(Code)
Increases the number of evolutionary rounds of chromosome in which it has not been changed by one.
author:
   Klaus Meffert
since:
   3.2



increaseOperatedOn
public void increaseOperatedOn()(Code)
Increase information of number of genetic operations performed on chromosome in current evolution round.
author:
   Klaus Meffert
since:
   3.2



operatedOn
public int operatedOn()(Code)
number of genetic operations performed on chromosome in currentevolution round
author:
   Klaus Meffert
since:
   3.2



resetAge
public void resetAge()(Code)
Reset age of chromosome because it has been changed.
author:
   Klaus Meffert
since:
   3.2



resetOperatedOn
public void resetOperatedOn()(Code)
Resets the information of how many genetic operators have been performed on the chromosome in the current round of evolution.
author:
   Klaus Meffert
since:
   3.2



setGene
public void setGene(int a_index, Gene a_gene)(Code)



setGenes
public void setGenes(Gene[] a_genes) throws InvalidConfigurationException(Code)
Sets the genes for the chromosome.
Parameters:
  a_genes - the genes to set for the chromosome
throws:
  InvalidConfigurationException - in case constraint checker isprovided
author:
   Klaus Meffert
since:
   3.2 (previously in class Chromosome)



setValueFromPersistentRepresentation
public void setValueFromPersistentRepresentation(String a_representation) throws UnsupportedRepresentationException(Code)
Counterpart of getPersistentRepresentation.
Parameters:
  a_representation - the string representation retrieved from a priorcall to the getPersistentRepresentation() method
throws:
  UnsupportedRepresentationException -
author:
   Klaus Meffert
since:
   3.2



size
public int size()(Code)
Returns the size of this Chromosome (the number of genes it contains). A Chromosome's size is constant and will not change, until setGenes(...) is used. number of genes contained within this Chromosome instance
author:
   Neil Rotstan
author:
   Klaus Meffert
since:
   1.0



split
final protected static List split(String a_string) throws UnsupportedRepresentationException(Code)
Splits the input a_string into individual gene representations.

Taken and adapted from CompositeGene.
Parameters:
  a_string - the string to split the elements of the returned array are the persistentrepresentation strings of the chromosome's components
throws:
  UnsupportedRepresentationException -
author:
   Klaus Meffert
since:
   3.2




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.