JAGA Homepage

org.jaga.individualRepresentation.greycodedNumbers
Class NDecimalsIndividual

java.lang.Object
  extended by org.jaga.individualRepresentation.greycodedNumbers.NNumbersGreycodedIndivudual
      extended by org.jaga.individualRepresentation.greycodedNumbers.NDecimalsIndividual
All Implemented Interfaces:
BinaryEncodedIndividual, Individual

public class NDecimalsIndividual
extends NNumbersGreycodedIndivudual

TODO: Complete these comments.

Project: JAGA - Java API for Genetic Algorithms.

Company: University College London and JAGA.Org (http://www.jaga.org).

Copyright: (c) 2004 by G. Paperin.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, ONLY if you include a note of the original author(s) in any redistributed/modified copy.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/gpl.html

Version:
JAGA public release 1.0 beta
Author:
Greg Paperin (greg@jaga.org)

Field Summary
private  double decimalScale
           
 
Constructor Summary
NDecimalsIndividual(int size, double decimalScale, int precision)
           
 
Method Summary
 double getDecimalScale()
           
 double getDoubleValue(int valueIndex)
           
 void setDoubleValue(int valueIndex, double value)
           
 java.lang.String toString()
          Produces a string representation of this individuial.
 
Methods inherited from class org.jaga.individualRepresentation.greycodedNumbers.NNumbersGreycodedIndivudual
bin2grey, getBitStringRepresentation, getClearBitCode, getFitness, getPrecision, getSize, grey2bin, setBitStringRepresentation, setClearBitCode, setFitness
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

decimalScale

private double decimalScale
Constructor Detail

NDecimalsIndividual

public NDecimalsIndividual(int size,
                           double decimalScale,
                           int precision)
Method Detail

getDecimalScale

public double getDecimalScale()

getDoubleValue

public double getDoubleValue(int valueIndex)

setDoubleValue

public void setDoubleValue(int valueIndex,
                           double value)

toString

public java.lang.String toString()
Description copied from interface: Individual
Produces a string representation of this individuial.

Specified by:
toString in interface Individual
Overrides:
toString in class java.lang.Object
Returns:
A string (mostly, human readable) representing this individual.

JAGA Homepage

Go to JAGA Homepage