The Encog Project

org.encog.neural.networks
Interface Layer

All Known Implementing Classes:
BasicLayer, FeedforwardLayer, HopfieldLayer, SOMLayer

public interface Layer

This interface defines all necessary methods for a neural network layer.

Author:
jheaton

Method Summary
 NeuralData compute(NeuralData pattern)
          Compute the output for this layer.
 NeuralData getFire()
           
 Matrix getMatrix()
           
 int getMatrixSize()
           
 int getNeuronCount()
           
 Layer getNext()
           
 Layer getPrevious()
           
 boolean hasMatrix()
           
 boolean isHidden()
           
 boolean isInput()
           
 boolean isOutput()
           
 void reset()
          Reset the weight matrix to random values.
 void setFire(int i, double value)
          Set the specified fire value.
 void setFire(NeuralData fire)
          Set the fire data.
 void setMatrix(Matrix matrix)
          Set the weight matrix.
 void setNext(Layer layer)
          Set the next layer.
 void setPrevious(Layer layer)
          Set the previous layer.
 

Method Detail

compute

NeuralData compute(NeuralData pattern)
Compute the output for this layer.

Parameters:
pattern - The input pattern.
Returns:
The output from this layer.

setPrevious

void setPrevious(Layer layer)
Set the previous layer.

Parameters:
layer - The previous layer.

getPrevious

Layer getPrevious()
Returns:
Get the previous layer.

setNext

void setNext(Layer layer)
Set the next layer.

Parameters:
layer - The next layer.

getFire

NeuralData getFire()
Returns:
The layer fire values.

getNeuronCount

int getNeuronCount()
Returns:
The neuron count.

isInput

boolean isInput()
Returns:
True if this is an input layer.

isHidden

boolean isHidden()
Returns:
True if this is a hidden layer.

getMatrix

Matrix getMatrix()
Returns:
The weight matrix.

reset

void reset()
Reset the weight matrix to random values.


getMatrixSize

int getMatrixSize()
Returns:
The matrix size.

setFire

void setFire(int i,
             double value)
Set the specified fire value.

Parameters:
i - The index to set.
value - The value to set.

setMatrix

void setMatrix(Matrix matrix)
Set the weight matrix.

Parameters:
matrix - The matrix to set.

isOutput

boolean isOutput()
Returns:
Is this an output matrix.

getNext

Layer getNext()
Returns:
The next layer.

hasMatrix

boolean hasMatrix()
Returns:
Does this layer have a matrix?

setFire

void setFire(NeuralData fire)
Set the fire data.

Parameters:
fire - The fire data.

The Encog Project