Java Doc for BaseGene.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.BaseGene

All known Subclasses:   org.jgap.impl.SetGene,  org.jgap.impl.NumberGene,  org.jgap.impl.MapGene,  org.jgap.impl.CompositeGene,  org.jgap.impl.BooleanGene,  org.jgap.impl.FixedBinaryGene,  org.jgap.supergenes.AbstractSupergene,  org.jgap.impl.StringGene,
BaseGene
abstract public class BaseGene implements Gene,IBusinessKey(Code)
Abstract base class for all genes. Provides default implementations.
author:
   Klaus Meffert
since:
   2.2


Field Summary
final public static  doubleDELTA
     Delta, useful for comparing doubles and floats.
final public static  StringS_APPLICATION_DATA
    

Constructor Summary
public  BaseGene(Configuration a_configuration)
    

Method Summary
public  voidcleanup()
     Executed by the genetic engine when this Gene instance is no longer needed and should perform any necessary resource cleanup.
protected  intcompareApplicationData(Object a_appdata1, Object a_appdata2)
    
protected  Stringdecode(String a_string)
    
protected  Stringencode(String a_string)
    
public  booleanequals(Object a_other)
     Compares this Gene with the given object and returns true if the other object is a Gene of the same type and has the same value (allele) as this Gene.
public  ObjectgetAllele()
     Retrieves the allele value represented by this Gene.
public  ObjectgetApplicationData()
     Retrieves the application-specific data that is attached to this Gene.
public  StringgetBusinessKey()
    
public  ConfigurationgetConfiguration()
    
public  IGeneConstraintCheckergetConstraintChecker()
    
public  doublegetEnergy()
    
abstract protected  ObjectgetInternalValue()
     Each Gene implementation holds its own m_value object keeping the allele value.
public  inthashCode()
     Retrieves the hash code value for a Gene.
public  booleanisCompareApplicationData()
    
public  GenenewGene()
     Provides implementation-independent means for creating new Gene instances.
abstract protected  GenenewGeneInternal()
    
public  voidsetApplicationData(Object a_newData)
     This sets the application-specific data that is attached to this Gene.
public  voidsetCompareApplicationData(boolean a_doCompare)
    
public  voidsetConstraintChecker(IGeneConstraintChecker a_constraintChecker)
     Sets the constraint checker to be used for this gene whenever method setAllele(Object) is called.
public  voidsetEnergy(double a_energy)
    
public  intsize()
     the size of the gene, i.e the number of atomic elements.
public  StringtoString()
     Retrieves a string representation of this Gene's value that may be useful for display purposes.

Field Detail
DELTA
final public static double DELTA(Code)
Delta, useful for comparing doubles and floats.



S_APPLICATION_DATA
final public static String S_APPLICATION_DATA(Code)
Constants for toString()




Constructor Detail
BaseGene
public BaseGene(Configuration a_configuration) throws InvalidConfigurationException(Code)

Parameters:
  a_configuration - the configuration to use
throws:
  InvalidConfigurationException -
author:
   Klaus Meffert
since:
   3.0




Method Detail
cleanup
public void cleanup()(Code)
Executed by the genetic engine when this Gene instance is no longer needed and should perform any necessary resource cleanup. If you need a special cleanup, override this method.
author:
   Klaus Meffert
since:
   1.0



compareApplicationData
protected int compareApplicationData(Object a_appdata1, Object a_appdata2)(Code)



decode
protected String decode(String a_string)(Code)



encode
protected String encode(String a_string)(Code)



equals
public boolean equals(Object a_other)(Code)
Compares this Gene with the given object and returns true if the other object is a Gene of the same type and has the same value (allele) as this Gene. Otherwise it returns false.
Parameters:
  a_other - the object to compare to this Gene for equality true if this Gene is equal to the given object, false otherwise
author:
   Klaus Meffert
since:
   1.1



getAllele
public Object getAllele()(Code)
Retrieves the allele value represented by this Gene. the allele value of this Gene
since:
   1.0



getApplicationData
public Object getApplicationData()(Code)
Retrieves the application-specific data that is attached to this Gene. Attaching application-specific data may be useful for some applications when it comes time to distinguish a Gene from another. JGAP ignores this data functionally. the application-specific data previously attached to this Gene,or null if there is no data attached
author:
   Klaus Meffert
since:
   2.4



getBusinessKey
public String getBusinessKey()(Code)



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



getConstraintChecker
public IGeneConstraintChecker getConstraintChecker()(Code)
IGeneConstraintChecker the constraint checker to be used whenevermethod setAllele(Object) is called.
author:
   Klaus Meffert
since:
   2.5 (moved from CompositeGene, where it was since 2.0)



getEnergy
public double getEnergy()(Code)
energy of the gene
author:
   Klaus Meffert
since:
   2.3



getInternalValue
abstract protected Object getInternalValue()(Code)
Each Gene implementation holds its own m_value object keeping the allele value. In your Gene implementation, just return it with this method (see org.jgap.impl.BooleanGene for example) the m_value object
author:
   Klaus Meffert
since:
   2.2



hashCode
public int hashCode()(Code)
Retrieves the hash code value for a Gene. Override if another hashCode() implementation is necessary or more appropriate than this default implementation. this Gene's hash code
author:
   Neil Rotstan
author:
   Klaus Meffert
since:
   1.0



isCompareApplicationData
public boolean isCompareApplicationData()(Code)



newGene
public Gene newGene()(Code)
Provides implementation-independent means for creating new Gene instances. The new instance that is created and returned should be setup with any implementation-dependent configuration that this Gene instance is setup with (aside from the actual value, of course). For example, if this Gene were setup with bounds on its value, then the Gene instance returned from this method should also be setup with those same bounds. This is important, as the JGAP core will invoke this method on each Gene in the sample Chromosome in order to create each new Gene in the same respective gene position for a new Chromosome. a new Gene instance of the same type and with the same setup asthis concrete Gene
author:
   Neil Rostan
author:
   Klaus Meffert
since:
   2.6 (since 1.0 in IntegerGene)



newGeneInternal
abstract protected Gene newGeneInternal()(Code)



setApplicationData
public void setApplicationData(Object a_newData)(Code)
This sets the application-specific data that is attached to this Gene. Attaching application-specific data may be useful for some applications when it comes time to distinguish a Gene from another. JGAP ignores this data functionally.
Parameters:
  a_newData - the new application-specific data to attach to thisGene
author:
   Klaus Meffert
since:
   2.4



setCompareApplicationData
public void setCompareApplicationData(boolean a_doCompare)(Code)
Should we also consider the application data when comparing? Default is "false" as "true" means a Gene is losing its identity when application data is set differently!
Parameters:
  a_doCompare - true: consider application data in method compareTo
author:
   Klaus Meffert
since:
   2.4



setConstraintChecker
public void setConstraintChecker(IGeneConstraintChecker a_constraintChecker)(Code)
Sets the constraint checker to be used for this gene whenever method setAllele(Object) is called.
Parameters:
  a_constraintChecker - the constraint checker to be set
author:
   Klaus Meffert
since:
   2.5 (moved from CompositeGene, where it was since 2.0)



setEnergy
public void setEnergy(double a_energy)(Code)
Sets the energy of the gene
Parameters:
  a_energy - the energy to set
author:
   Klaus Meffert
since:
   2.3



size
public int size()(Code)
the size of the gene, i.e the number of atomic elements. Always 1for non-composed Gene types. Override for composed Gene types
author:
   Neil Rotstan
since:
   1.0



toString
public String toString()(Code)
Retrieves a string representation of this Gene's value that may be useful for display purposes. a string representation of this Gene's value
author:
   Klaus Meffert
since:
   1.0



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.