package genesom;


public class WeightsInitVisitor
  extends NodeVisitor
{
  protected WeightsInitFunction wif;

  public WeightsInitVisitor() {}

  public void setCallback(Object o) { wif = (WeightsInitFunction)o; }

  public boolean at(Node curr_node)
  {
    double winit[] = ((Node)curr_node).getWeights();  // assumes weights reference

    for(int i = 0; i < winit.length; i++)
      winit[i] = wif.value();

    return true;
  }

}
