Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core
Class BinaryGene

java.lang.Object
  extended byorg.evolvica.core.AbstractGene
      extended byorg.evolvica.core.BinaryGene
All Implemented Interfaces:
IGenotype, java.io.Serializable

public class BinaryGene
extends AbstractGene

A gene of type binary string. This gene contains one single string as a value.

Since:
0.4.0
Version:
$Revision: 1.7 $ $Date: 2004/05/26 11:57:51 $
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
protected  BitVector value
          The binary string value of this gene.
 
Constructor Summary
BinaryGene(BitVector value)
          Constructor.
 
Method Summary
 IGenotype copy()
          Creates a complete copy of this genotype (optional operation).
 BitVector getValue()
          Returns the value.
 void setValue(BitVector value)
          Sets the value.
 java.lang.String toString()
          Returns a string representation of this gene.
 
Methods inherited from class org.evolvica.core.AbstractGene
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected BitVector value
The binary string value of this gene.

Constructor Detail

BinaryGene

public BinaryGene(BitVector value)
Constructor.

Parameters:
value - the value of this gene
Method Detail

copy

public IGenotype copy()
Description copied from interface: IGenotype
Creates a complete copy of this genotype (optional operation). Note that this is an optional operation. Operators should not rely on this method and use a genotype builder for creating new genotypes.

Returns:
new genotype containing the same genetic information
See Also:
IGenotype.copy()

getValue

public BitVector getValue()
Returns the value.

Returns:
float

setValue

public void setValue(BitVector value)
Sets the value.

Parameters:
value - The value to set

toString

public java.lang.String toString()
Returns a string representation of this gene.

Returns:
string representation

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems