Package ann4j
Class NeuronObserver
java.lang.Object
ann4j.NeuronObserver
- All Implemented Interfaces:
Observer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNeuronToBeObserved
(int layerNum, int neuronNum) Add a neuron to the list of objects to be observed.void
addObjectToBeObserved
(Observable observable) This function adds an object to the list of objects that this object will observe.void
clear()
Clearing the list of objects that this object will observe.void
setModel
(LayerManager model) This function sets the model to be observed.void
update
(String info, Observable observable) The update function is called when the observable object is changed
-
Field Details
-
observableList
ArrayList<Observable> observableList
-
-
Constructor Details
-
NeuronObserver
public NeuronObserver()
-
-
Method Details
-
update
The update function is called when the observable object is changed -
setModel
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
This function adds an object to the list of objects that this object will observe.- Specified by:
addObjectToBeObserved
in interfaceObserver
- 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.
-