saaps.ann.mlff
Class Layer

java.lang.Object
  |
  +--saaps.ann.mlff.Layer

public class Layer
extends java.lang.Object

This class represents a layer in a multi layer feed forward neural network. The layer consist of a collection of Neuron objects.

See Also:
Neuron, Network

Constructor Summary
Layer()
          Creates new Layer
Layer(int n)
          Create a layer of neurons.
Layer(Neuron[] n)
          Create a layer of neurons.
 
Method Summary
 Data getOutput()
          Get the output data from the layer.
 void setInput(Data d)
          Set the input data to the layer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Layer

public Layer()
Creates new Layer

Layer

public Layer(int n)
Create a layer of neurons.
Parameters:
n - The number of neurons.

Layer

public Layer(Neuron[] n)
Create a layer of neurons.
Parameters:
n - An array of neurons
Method Detail

setInput

public void setInput(Data d)
Set the input data to the layer.
Parameters:
d - The input data

getOutput

public Data getOutput()
Get the output data from the layer.

If new input data has been presented to the layer then the layer is first run.

The input data to the layer is distributed to each neuron in the layer. Each neuron then processes the data. The number of outputs from the layer equals the number of neurons in the layer.

Returns:
The output data from the layer