Package ann4j

Class NeuronObserver

java.lang.Object
ann4j.NeuronObserver
All Implemented Interfaces:
Observer

public class NeuronObserver extends Object implements Observer
  • Field Details

  • Constructor Details

    • NeuronObserver

      public NeuronObserver()
  • Method Details

    • update

      public void update(String info, Observable observable)
      The update function is called when the observable object is changed
      Specified by:
      update in interface Observer
      Parameters:
      info - The message that the observable sends to the observer.
      observable - The object that is being observed.
    • setModel

      public void setModel(LayerManager model)
      This function sets the model to be observed.
      Parameters:
      model - The model to be observed.
    • addNeuronToBeObserved

      public void addNeuronToBeObserved(int layerNum, int neuronNum)
      Add a neuron to the list of objects to be observed.
      Parameters:
      layerNum - The layer number of the neuron you want to observe.
      neuronNum - The index of the neuron in the layer.
    • addObjectToBeObserved

      public void addObjectToBeObserved(Observable observable)
      This function adds an object to the list of objects that this object will observe.
      Specified by:
      addObjectToBeObserved in interface Observer
      Parameters:
      observable - The object that is being observed, here it is neuron
    • clear

      public void clear()
      Clearing the list of objects that this object will observe.
      Specified by:
      clear in interface Observer