|
Neuroph | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neuroph.core.Layer
public class Layer
The Layer class represents layer (collection) of neurons in neural network. The Layer is basic neuron container, and it provides methods for manipulating neurons (add, remove, get, set, calculate, randomize).
Neuron
,
Serialized FormField Summary | |
---|---|
protected java.util.Vector<Neuron> |
neurons
Neurons collection |
private NeuralNetwork |
parentNetwork
Reference to parent neural network |
private static long |
serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class |
Constructor Summary | |
---|---|
Layer()
Creates an instance of empty Layer |
|
Layer(int neuronsNum,
NeuronProperties neuronProperties)
Creates an instance of Layer with the specified number of neurons with specified neuron properties |
Method Summary | |
---|---|
void |
addNeuron(int idx,
Neuron neuron)
Adds specified neuron to this layer,at specified index position |
void |
addNeuron(Neuron neuron)
Adds specified neuron to this layer |
void |
calculate()
Performs calculaton for all neurons in this layer |
Neuron |
getNeuronAt(int idx)
Returns neuron at specified index position in this layer |
java.util.Vector<Neuron> |
getNeurons()
Returns collection of neurons in this layer |
int |
getNeuronsCount()
Returns number of neurons in this layer |
java.util.Iterator<Neuron> |
getNeuronsIterator()
Returns interface for iterating neurons in this layer |
NeuralNetwork |
getParentNetwork()
Returns reference to parent network |
int |
indexOf(Neuron neuron)
Returns the index position in layer for the specified neuron |
void |
randomizeWeights()
Randomize input connection weights for all neurons in this layer |
void |
removeNeuron(Neuron neuron)
Removes neuron from layer |
void |
removeNeuronAt(int idx)
Removes neuron at specified index position in this layer |
void |
reset()
Resets the activation and input levels for all neurons in this layer |
void |
setNeuron(int idx,
Neuron neuron)
Sets (replace) the neuron at specified position in layer |
void |
setParentNetwork(NeuralNetwork parent)
Sets reference on parent network |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private NeuralNetwork parentNetwork
protected java.util.Vector<Neuron> neurons
Constructor Detail |
---|
public Layer()
public Layer(int neuronsNum, NeuronProperties neuronProperties)
Method Detail |
---|
public void setParentNetwork(NeuralNetwork parent)
parent
- parent networkpublic NeuralNetwork getParentNetwork()
public java.util.Iterator<Neuron> getNeuronsIterator()
public java.util.Vector<Neuron> getNeurons()
public void addNeuron(Neuron neuron)
neuron
- neuron to addpublic void addNeuron(int idx, Neuron neuron)
neuron
- neuron to addidx
- index position at which neuron should be addedpublic void setNeuron(int idx, Neuron neuron)
idx
- index position to set/replaceneuron
- new Neuron object to setpublic void removeNeuron(Neuron neuron)
neuron
- neuron to removepublic void removeNeuronAt(int idx)
idx
- index position of neuron to removepublic Neuron getNeuronAt(int idx)
idx
- neuron index position
public int indexOf(Neuron neuron)
neuron
- neuron object
public int getNeuronsCount()
public void calculate()
public void reset()
public void randomizeWeights()
|
Neuroph | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |