org.vizzini.ai.neuralnetwork
Interface ILayer

All Superinterfaces:
Cloneable
All Known Implementing Classes:
AbstractFunctionLayer, AbstractLayer, BinaryEncodeLayer, DefaultLayer, InputLayer, OutputLayer

public interface ILayer
extends Cloneable

Defines methods required by a layer of a neural network.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Method Summary
 void clear()
          Clear the node input and output values.
 void clearInputs()
          Clear the node input values.
 void clearOutputs()
          Clear the node output values.
 Object clone()
          Return a clone of this instance.
 boolean equals(Object object)
          Return true if the given object is equal to this.
 double[] evaluate(double[] inputs)
          Apply the given inputs and return the output of the layer.
 IActivationFunction getActivationFunction()
          Return the activation function.
 double getInput(int i)
          Return the node input value at the given index.
 int getInputCount()
          Return the input count.
 double[] getInputs()
          Return the node input values.
 int getMaxValueIndex()
          Return the index of the node with the maximum value.
 String getName()
          Return the name.
 double getOutput(int i)
          Return the node output value at the given index.
 int getOutputCount()
          Return the output count.
 double[] getOutputs()
          Return the node output values.
 int hashCode()
          Return a hash code.
 void setActivationFunction(IActivationFunction function)
          Set the activation function.
 void setInput(int i, double value)
           
 void setInputs(double[] inputs)
           
 String toDetailString()
          Return a string representation of the details of this object.
 String toString()
          Return a string representation of this object.
 

Method Detail

clear

void clear()
Clear the node input and output values.

Since:
v0.3

clearInputs

void clearInputs()
Clear the node input values.

Since:
v0.3

clearOutputs

void clearOutputs()
Clear the node output values.

Since:
v0.3

clone

Object clone()
Return a clone of this instance.

Since:
v0.3

equals

boolean equals(Object object)
Return true if the given object is equal to this.

Overrides:
equals in class Object
Parameters:
object - The object to compare equality against.
Returns:
Returns true if the objects are equal, otherwise false
Since:
v0.3

evaluate

double[] evaluate(double[] inputs)
Apply the given inputs and return the output of the layer.

Parameters:
inputs - Node input values.
Since:
v0.3

getActivationFunction

IActivationFunction getActivationFunction()
Return the activation function.

Since:
v0.3

getInput

double getInput(int i)
Return the node input value at the given index.

Parameters:
i - Index.
Since:
v0.3

getInputCount

int getInputCount()
Return the input count.

Since:
v0.3

getInputs

double[] getInputs()
Return the node input values.

Since:
v0.3

getMaxValueIndex

int getMaxValueIndex()
Return the index of the node with the maximum value.

Since:
v0.3

getName

String getName()
Return the name.

Since:
v0.3

getOutput

double getOutput(int i)
Return the node output value at the given index.

Parameters:
i - Index.
Since:
v0.3

getOutputCount

int getOutputCount()
Return the output count.

Since:
v0.3

getOutputs

double[] getOutputs()
Return the node output values.

Since:
v0.3

hashCode

int hashCode()
Return a hash code.

Overrides:
hashCode in class Object
Since:
v0.3

setActivationFunction

void setActivationFunction(IActivationFunction function)
Set the activation function.

Parameters:
function - Activation function.
Since:
v0.3

setInput

void setInput(int i,
              double value)
Parameters:
value - The input value to set.
Since:
v0.3

setInputs

void setInputs(double[] inputs)
Parameters:
inputs - The inputs to set.
Since:
v0.3

toDetailString

String toDetailString()
Return a string representation of the details of this object.

Since:
v0.3

toString

String toString()
Return a string representation of this object.

Overrides:
toString in class Object
Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02