|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.htwdd.rosenkoenig.neuro.net.Layer
public abstract class Layer
This abstract class is the base class for the layers used in this project.
| Field Summary | |
|---|---|
protected ActivationFunction |
activationFunction
The activation function of the net. |
protected boolean |
biased
This determines whether the layer is biased or not. |
protected double[] |
nettoInput
An array to remember the netto input. |
protected int |
neuronsThatAreNotBiasedCount
This speakingly named variable gives us the number of neurons in a layer that are not biased. |
protected double[] |
output
This array of doubles contains the outupt of this layer. |
protected Synapse |
outputSynapse
This is the output synapse (i.e the connection to the next layer). |
| Constructor Summary | |
|---|---|
Layer()
Default Ctor. |
|
Layer(int numNeurons,
boolean biased)
Ctor that creates a layer with numNeurons that is biased or not. |
|
Layer(int numNeurons,
boolean biased,
ActivationFunction activationFunction)
Ctor that creates a layer with numNeurons that is biased or not. |
|
| Method Summary | |
|---|---|
ActivationFunction |
getActivationFunction()
Getter of the property activationFunction |
double[] |
getNettoInput()
Getter of the property nettoInput |
int |
getNeuronsThatAreNotBiasedCount()
Getter of the property offset |
double[] |
getOutput()
Getter of the property output |
Synapse |
getOutputSynapse()
Getter of the property outputSynapse |
int |
getSize()
|
boolean |
isBiased()
Return whether this layer is biased or not. |
abstract void |
propagate()
The propagate function must be implemented by every layer. |
void |
setActivationFunction(ActivationFunction activationFunction)
Setter of the property activationFunction |
void |
setBiased(boolean biased)
Set the biased state of the layer. |
void |
setOutputSynapse(Synapse outputSynapse)
Setter of the property outputSynapse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean biased
protected ActivationFunction activationFunction
protected double[] nettoInput
protected double[] output
protected Synapse outputSynapse
protected int neuronsThatAreNotBiasedCount
| Constructor Detail |
|---|
public Layer()
public Layer(int numNeurons,
boolean biased)
numNeurons - the number of neurons for this layerbiased - whether or not this layer is a biased one
public Layer(int numNeurons,
boolean biased,
ActivationFunction activationFunction)
numNeurons - the number of neurons for this layerbiased - whether or not this layer is a biased one| Method Detail |
|---|
public abstract void propagate()
public void setBiased(boolean biased)
public ActivationFunction getActivationFunction()
public void setActivationFunction(ActivationFunction activationFunction)
activationFunction - The activationFunction to set.public double[] getNettoInput()
public double[] getOutput()
public int getNeuronsThatAreNotBiasedCount()
public Synapse getOutputSynapse()
public void setOutputSynapse(Synapse outputSynapse)
outputSynapse - The outputSynapse to set.public int getSize()
public boolean isBiased()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||