JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.weightNetwork
Class WeightList

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

public class WeightList
extends UpdateAndPropagatable

See Also:
Serialized Form

Field Summary
protected  Weight currentWeights
           
protected  java.util.Vector initialWeights
           
protected  ReinitializableFloat weightSum
           
 
Fields inherited from class gov.nasa.javaGenes.weightNetwork.UpdateAndPropagatable
needToUpdateAndPropagate
 
Constructor Summary
WeightList()
           
 
Method Summary
 void add(Weight w)
           
 boolean currentlyContains(Weight isInNow)
           
 int currentSize()
           
 boolean everContains(Weight isIn)
           
 float getCurrentWeightSumFromCalculation()
           
 Weight getFirst()
           
 int getInitialSize()
           
 float getMaxCurrentWeight()
           
 float getMinCurrentWeight()
           
 Weight getWeight(int index)
           
 float getWeightSum()
           
 void initializeWeightSum()
           
 boolean isCurrentlyEmpty()
           
 boolean more()
           
 void reinitialize()
          turn intialWeights into a doubly linked list for easy deletion
 void removeFromWeightList(Weight w)
           
 void setFirst(Weight w)
           
 void weightChanged(float oldValue, float newValue)
           
 
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

initialWeights

protected java.util.Vector initialWeights

currentWeights

protected Weight currentWeights

weightSum

protected ReinitializableFloat weightSum
Constructor Detail

WeightList

public WeightList()
Method Detail

weightChanged

public void weightChanged(float oldValue,
                          float newValue)

initializeWeightSum

public void initializeWeightSum()

removeFromWeightList

public void removeFromWeightList(Weight w)

getMinCurrentWeight

public float getMinCurrentWeight()

getMaxCurrentWeight

public float getMaxCurrentWeight()

getCurrentWeightSumFromCalculation

public float getCurrentWeightSumFromCalculation()

currentlyContains

public boolean currentlyContains(Weight isInNow)

everContains

public boolean everContains(Weight isIn)

more

public boolean more()

reinitialize

public void reinitialize()
turn intialWeights into a doubly linked list for easy deletion


add

public void add(Weight w)

currentSize

public int currentSize()

getInitialSize

public int getInitialSize()

getWeight

public Weight getWeight(int index)

getFirst

public Weight getFirst()

setFirst

public void setFirst(Weight w)

getWeightSum

public float getWeightSum()

isCurrentlyEmpty

public boolean isCurrentlyEmpty()

JavaGenes, NASA Ames. Written largely by Al Globus