com.anji.nn
Class CacheNeuronConnection
java.lang.Object
com.anji.nn.NeuronConnection
com.anji.nn.CacheNeuronConnection
- All Implemented Interfaces:
- Connection
public class CacheNeuronConnection
- extends NeuronConnection
A connection between neurons that caches its value from previous timestep. This is used to
avoid deadlock when activating neurons and connections in a loop.
- Author:
- Philip Tucker
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CacheNeuronConnection
public CacheNeuronConnection(Neuron anIncoming)
- See Also:
NeuronConnection.NeuronConnection(Neuron)
CacheNeuronConnection
public CacheNeuronConnection(Neuron anIncoming,
double aWeight)
- See Also:
NeuronConnection.NeuronConnection(Neuron, double)
read
public double read()
- Specified by:
read
in interface Connection
- Overrides:
read
in class NeuronConnection
- Returns:
- double cached value
step
public void step()
- update value
toXml
public java.lang.String toXml()
- Specified by:
toXml
in interface Connection
- Overrides:
toXml
in class NeuronConnection
- Returns:
- String XML representation of object
reset
public void reset()
- clear cached value
isRecurrent
public boolean isRecurrent()
- Overrides:
isRecurrent
in class NeuronConnection
- Returns:
- true
cost
public long cost()
- Specified by:
cost
in interface Connection
- Overrides:
cost
in class NeuronConnection
- Returns:
- number corresponding to cost of activation in resources
- See Also:
Connection.cost()