weka.attributeSelection
Class GeneticSearch.GABitSet

java.lang.Object
  extended byweka.attributeSelection.GeneticSearch.GABitSet
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Enclosing class:
GeneticSearch

protected class GeneticSearch.GABitSet
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Field Summary
private  java.util.BitSet m_chromosome
           
private  double m_fitness
           
private  double m_objective
          holds raw merit
 
Constructor Summary
GeneticSearch.GABitSet()
          Constructor
 
Method Summary
 void clear(int bit)
          unset a bit in the chromosome
 java.lang.Object clone()
          makes a copy of this GABitSet
 boolean get(int bit)
          get the value of a bit in the chromosome
 java.util.BitSet getChromosome()
          get the chromosome
 double getFitness()
          gets the scaled fitness
 double getObjective()
          gets the objective merit
 void set(int bit)
          set a bit in the chromosome
 void setChromosome(java.util.BitSet c)
          set the chromosome
 void setFitness(double fitness)
          sets the scaled fitness
 void setObjective(double objective)
          sets the objective merit value
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_chromosome

private java.util.BitSet m_chromosome

m_objective

private double m_objective
holds raw merit


m_fitness

private double m_fitness
Constructor Detail

GeneticSearch.GABitSet

public GeneticSearch.GABitSet()
Constructor

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
makes a copy of this GABitSet

Returns:
a copy of the object
Throws:
java.lang.Exception - if something goes wrong
java.lang.CloneNotSupportedException

setObjective

public void setObjective(double objective)
sets the objective merit value

Parameters:
objective - the objective value of this population member

getObjective

public double getObjective()
gets the objective merit

Returns:
the objective merit of this population member

setFitness

public void setFitness(double fitness)
sets the scaled fitness


getFitness

public double getFitness()
gets the scaled fitness

Returns:
the scaled fitness of this population member

getChromosome

public java.util.BitSet getChromosome()
get the chromosome

Returns:
the chromosome of this population member

setChromosome

public void setChromosome(java.util.BitSet c)
set the chromosome


clear

public void clear(int bit)
unset a bit in the chromosome

Parameters:
bit - the bit to be cleared

set

public void set(int bit)
set a bit in the chromosome

Parameters:
bit - the bit to be set

get

public boolean get(int bit)
get the value of a bit in the chromosome

Parameters:
bit - the bit to query
Returns:
the value of the bit