public abstract class NeuronLayer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Neuron[] |
neurons
Stores all Neurons in this layer
|
protected ThresholdingAlgorithm |
thresholdModel
The thresholding model to use for back propagation
|
| Constructor and Description |
|---|
NeuronLayer(ThresholdingAlgorithm p_thresholdModel)
Creates a blank neuron layer with the threshold model provided.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNeuron(Neuron p_neuron)
Adds a neuron to the layer.
|
int |
countNeurons()
Returns the number of neurons currently in this layer.
|
Neuron |
getNeuron(int p_index)
Returns a neuron with the index provided
|
Neuron[] |
getNeurons()
Returns all Neurons in this layer.
|
boolean |
isPresent(Neuron p_neuron)
checks if a Neuron is held in this layer.
|
void |
removeNeuron(int p_index)
Removes a neuron from the layer by index.
|
void |
removeNeuron(Neuron p_neuron)
Removes a neuron from this layer.
|
protected ThresholdingAlgorithm thresholdModel
public NeuronLayer(ThresholdingAlgorithm p_thresholdModel)
p_thresholdModel - The thresholding algorithm chosenpublic void addNeuron(Neuron p_neuron)
p_neuron - The neuron to add to this layer.public void removeNeuron(Neuron p_neuron) throws ItemNotFoundException
p_neuron - The neuron to remove.ItemNotFoundException - if the neuron passed is not present.public void removeNeuron(int p_index)
throws IndexOutOfBoundsException
p_index - The index of the neuron to removeIndexOutOfBoundsException - in the event that the index given is out of range.public int countNeurons()
public Neuron getNeuron(int p_index) throws IndexOutOfBoundsException
p_index - The index of the Neuron to returnIndexOutOfBoundsException - in the event that the index is out of range.public Neuron[] getNeurons()
public boolean isPresent(Neuron p_neuron)
p_neuron - The neuron to check for