org.joone.structure
Class ContextNode

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

public class ContextNode
extends AbstractNode

A context node. A context node is a node that has an initial state and that also blends in the prior outputs from its own input nodes with the current output. To cater for simulations, where repeated runs from the same state is required, it is possible to switch it into fixed mode. In fixed mode, the internal state is retained, not updated with new patterns, until out of fixed mode again.

Author:
mg

Field Summary
protected  double decay
          The context node's decay rate
protected  boolean fixed
          True if the node is in fixed state at present
protected  double fixedState
          Internal variable used to store fixed state
protected  double initialState
          The node's initial state
 
Fields inherited from class org.joone.structure.AbstractNode
connections, derivativeFunction, lastDerivative, lastDerivativePattern, lastInputValue, lastOutputValue, lastPattern, order, transportFunction
 
Constructor Summary
ContextNode()
           
 
Method Summary
 double getDecay()
          Retrieve the decay rate
 double getInitialState()
          Retrieve the initial state
 double getInputValue(int pattern)
          The node's input value at the given pattern number
 boolean isFixed()
          Retrieve the fixed state of the node
 void setDecay(double decay)
          Set the context node decay rate
 void setFixed(boolean fixed)
          Set the fixed state of the node
 void setInitialState(double initialState)
          Set the initial state
 
Methods inherited from class org.joone.structure.AbstractNode
calculateOrder, getConnections, getDerivative, getOrder, getOutputValue, getTreeNode, setOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

decay

protected double decay
The context node's decay rate


initialState

protected double initialState
The node's initial state


fixed

protected boolean fixed
True if the node is in fixed state at present


fixedState

protected double fixedState
Internal variable used to store fixed state

Constructor Detail

ContextNode

public ContextNode()
Method Detail

setDecay

public void setDecay(double decay)
Set the context node decay rate


getDecay

public double getDecay()
Retrieve the decay rate


setInitialState

public void setInitialState(double initialState)
Set the initial state


getInitialState

public double getInitialState()
Retrieve the initial state


setFixed

public void setFixed(boolean fixed)
Set the fixed state of the node


isFixed

public boolean isFixed()
Retrieve the fixed state of the node


getInputValue

public double getInputValue(int pattern)
The node's input value at the given pattern number

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


Submit Feedback to pmarrone@users.sourceforge.net