JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.weightNetwork
Class RouletteWheelChooseLowWeight

java.lang.Object
  extended bygov.nasa.javaGenes.weightNetwork.UpdateAndPropagatable
      extended bygov.nasa.javaGenes.weightNetwork.WeightList
          extended bygov.nasa.javaGenes.weightNetwork.RouletteWheelChooseLowWeight
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AccessWindowsList

public class RouletteWheelChooseLowWeight
extends WeightList

See Also:
Serialized Form

Field Summary
protected  boolean mustCalculateSubtractWeightFrom
           
protected  int numberOfWeightsRemoved
           
protected  float subtractWeightFrom
           
 
Fields inherited from class gov.nasa.javaGenes.weightNetwork.WeightList
currentWeights, initialWeights, weightSum
 
Fields inherited from class gov.nasa.javaGenes.weightNetwork.UpdateAndPropagatable
needToUpdateAndPropagate
 
Constructor Summary
RouletteWheelChooseLowWeight()
           
 
Method Summary
 void add(Weight w)
           
 void reinitialize()
          turn intialWeights into a doubly linked list for easy deletion
 void removeFromWeightList(Weight w)
           
 Weight spinWheel()
           
protected  Weight spinWheel(float random)
          only for testing.
 
Methods inherited from class gov.nasa.javaGenes.weightNetwork.WeightList
currentlyContains, currentSize, everContains, getCurrentWeightSumFromCalculation, getFirst, getInitialSize, getMaxCurrentWeight, getMinCurrentWeight, getWeight, getWeightSum, initializeWeightSum, isCurrentlyEmpty, more, setFirst, weightChanged
 
Methods inherited from class gov.nasa.javaGenes.weightNetwork.UpdateAndPropagatable
mustToUpdateAndPropagate, startUpdateAndPropagate, updateAndPropagate, updateAndPropagateDone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subtractWeightFrom

protected float subtractWeightFrom

mustCalculateSubtractWeightFrom

protected boolean mustCalculateSubtractWeightFrom

numberOfWeightsRemoved

protected int numberOfWeightsRemoved
Constructor Detail

RouletteWheelChooseLowWeight

public RouletteWheelChooseLowWeight()
Method Detail

reinitialize

public void reinitialize()
Description copied from class: WeightList
turn intialWeights into a doubly linked list for easy deletion

Overrides:
reinitialize in class WeightList

add

public void add(Weight w)
Overrides:
add in class WeightList

removeFromWeightList

public void removeFromWeightList(Weight w)
Overrides:
removeFromWeightList in class WeightList

spinWheel

public Weight spinWheel()

spinWheel

protected Weight spinWheel(float random)
only for testing. Do not call in operation!


JavaGenes, NASA Ames. Written largely by Al Globus