org.encog.solve.genetic.genes
Class BasicGene

java.lang.Object
  extended by org.encog.solve.genetic.genes.BasicGene
All Implemented Interfaces:
Comparable<Gene>, Gene
Direct Known Subclasses:
CharGene, DoubleGene, IntegerGene, NEATLinkGene, NEATNeuronGene

public abstract class BasicGene
extends Object
implements Gene

Implements the basic functionality for a gene. This is an abstract class.


Constructor Summary
BasicGene()
           
 
Method Summary
 int compareTo(Gene o)
          
 long getId()
          Get the ID of this gene, -1 for undefined.
 long getInnovationId()
           
 boolean isEnabled()
           
 void setEnabled(boolean e)
          Determine if this gene is enabled.
 void setId(long id)
          Set the id for this gene.
 void setInnovationId(long innovationID)
          Set the innovation id for this gene.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.encog.solve.genetic.genes.Gene
copy
 

Constructor Detail

BasicGene

public BasicGene()
Method Detail

compareTo

public int compareTo(Gene o)

Specified by:
compareTo in interface Comparable<Gene>

getId

public long getId()
Description copied from interface: Gene
Get the ID of this gene, -1 for undefined.

Specified by:
getId in interface Gene
Returns:
The id of this gene.

getInnovationId

public long getInnovationId()
Specified by:
getInnovationId in interface Gene
Returns:
The innovation id of this gene.

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface Gene
Returns:
True, if this gene is enabled.

setEnabled

public void setEnabled(boolean e)
Description copied from interface: Gene
Determine if this gene is enabled.

Specified by:
setEnabled in interface Gene
Parameters:
e - True, if this gene is enabled.

setId

public void setId(long id)
Set the id for this gene.

Parameters:
id - The id for this gene.

setInnovationId

public void setInnovationId(long innovationID)
Set the innovation id for this gene.

Parameters:
innovationID - The innovation id for this gene.


Copyright © 2011. All Rights Reserved.