weka.attributeSelection
Class GeneticSearch.GABitSet

java.lang.Object
  |
  +--weka.attributeSelection.GeneticSearch.GABitSet
All Implemented Interfaces:
java.lang.Cloneable
Enclosing class:
GeneticSearch

protected class GeneticSearch.GABitSet
extends java.lang.Object
implements java.lang.Cloneable


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
 

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
Overrides:
clone in class java.lang.Object
Returns:
a copy of the object
Throws:
java.lang.Exception - if something goes wrong

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
Parameters:
the - scaled fitness of this population member

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

setChromosome

public void setChromosome(java.util.BitSet c)
set the chromosome
Parameters:
the - chromosome to be set for this population member

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