org.joone.structure
Class BiasNode

java.lang.Object
  extended by org.joone.structure.AbstractNode
      extended by org.joone.structure.InputNode
          extended by org.joone.structure.BiasNode
All Implemented Interfaces:
Node

public class BiasNode
extends InputNode

A bias node. A bias node is simply an input node that fires a constant, default 1, every time it is asked for an output value.

Author:
mg

Field Summary
 
Fields inherited from class org.joone.structure.AbstractNode
connections, derivativeFunction, lastDerivative, lastDerivativePattern, lastInputValue, lastOutputValue, lastPattern, order, transportFunction
 
Constructor Summary
BiasNode()
          The default bias node that fires 1s all the time
BiasNode(double bias)
          A bias node that fires the given value each time
 
Method Summary
 double getInputValue(int pattern)
          The node's input value which is simply the bias
 double getOutputValue(int pattern)
          Retrieve the output value, which is the bias
 
Methods inherited from class org.joone.structure.InputNode
setInputValue
 
Methods inherited from class org.joone.structure.AbstractNode
calculateOrder, getConnections, getDerivative, getOrder, getTreeNode, setOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BiasNode

public BiasNode()
The default bias node that fires 1s all the time


BiasNode

public BiasNode(double bias)
A bias node that fires the given value each time

Method Detail

getInputValue

public double getInputValue(int pattern)
The node's input value which is simply the bias

Specified by:
getInputValue in interface Node
Overrides:
getInputValue in class AbstractNode
Parameters:
pattern - the pattern number, 1 for the first pattern

getOutputValue

public double getOutputValue(int pattern)
Retrieve the output value, which is the bias

Specified by:
getOutputValue in interface Node
Overrides:
getOutputValue in class InputNode
Parameters:
pattern - the pattern number, 1 for the first pattern


Submit Feedback to pmarrone@users.sourceforge.net