org.encog.solve.genetic.genes
Class IntegerGene

java.lang.Object
  extended by org.encog.solve.genetic.genes.BasicGene
      extended by org.encog.solve.genetic.genes.IntegerGene
All Implemented Interfaces:
Comparable<Gene>, Gene

public class IntegerGene
extends BasicGene

A gene that contains an integer value.


Constructor Summary
IntegerGene()
           
 
Method Summary
 void copy(Gene gene)
          Copy another gene to this one.
 boolean equals(Object obj)
          
 int getValue()
           
 int hashCode()
           
 void setValue(int value)
          Set the value of this gene.
 String toString()
          
 
Methods inherited from class org.encog.solve.genetic.genes.BasicGene
compareTo, getId, getInnovationId, isEnabled, setEnabled, setId, setInnovationId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntegerGene

public IntegerGene()
Method Detail

copy

public void copy(Gene gene)
Copy another gene to this one.

Parameters:
gene - The other gene to copy.

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

getValue

public int getValue()
Returns:
The value of this gene.

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Returns:
a hash code.

setValue

public void setValue(int value)
Set the value of this gene.

Parameters:
value - The value of this gene.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.