weka.attributeSelection
Class GeneticSearch.GABitSet

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

protected class GeneticSearch.GABitSet
extends Object
implements Cloneable


Constructor Summary
GeneticSearch.GABitSet()
          Constructor
 
Method Summary
 void clear(int bit)
          unset a bit in the chromosome
 Object clone()
          makes a copy of this GABitSet
 boolean get(int bit)
          get the value of a bit in the chromosome
 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(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 Object clone()
             throws CloneNotSupportedException
makes a copy of this GABitSet

Overrides:
clone in class Object
Returns:
a copy of the object
Throws:
Exception - if something goes wrong
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 BitSet getChromosome()
get the chromosome

Returns:
the chromosome of this population member

setChromosome

public void setChromosome(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