public class InputNode extends Node<InputNode,NodeActivation<InputNode>>
InputNode class is the input layer for the boolean logic. The input-node has two sources of
activations. First, it might be underlying logic node of an InputNeuron in which case the input
activations come from the outside. The second option is that the activation come from the output of another neuron.Node.RidVisited, Node.ThreadState<T extends Node,A extends NodeActivation<T>>| Modifier and Type | Field and Description |
|---|---|
Neuron |
inputNeuron |
Synapse.Key |
key |
ReadWriteLock |
synapseLock |
Map<org.aika.lattice.InputNode.SynapseKey,Synapse> |
synapses |
allOrChildren, andChildren, BEGIN_COMP, END_COMP, isDiscovered, level, lock, MAX_NODE, MAX_RELATIVE_RID, MIN_NODE, numberOfNeuronRefs, orChildren, reverseAndChildren, RID_COMP, statistic, threadslastUsedDocumentId, provider| Constructor and Description |
|---|
InputNode() |
InputNode(Model m,
Synapse.Key key) |
| Modifier and Type | Method and Description |
|---|---|
static InputNode |
add(Model m,
Synapse.Key key,
INeuron input) |
void |
addActivation(Document doc,
NodeActivation inputAct) |
void |
cleanup() |
double |
computeSynapseWeightSum(Integer offset,
INeuron n) |
protected NodeActivation<InputNode> |
createActivation(Document doc,
NodeActivation.Key ak) |
void |
discover(Document doc,
NodeActivation<InputNode> act,
PatternDiscovery.Config config) |
Synapse |
getSynapse(Integer rid,
Neuron outputNeuron) |
boolean |
isAllowedOption(int threadId,
InterpretationNode n,
NodeActivation act,
long v) |
String |
logicToString() |
void |
propagateAddedActivation(Document doc,
NodeActivation act)
Propagate an activation to the next node or the next neuron that is depending on the current node.
|
void |
readFields(DataInput in,
Model m)
Deserialize the fields of this object from
in. |
void |
remove() |
void |
removeSynapse(Synapse s) |
void |
setSynapse(Synapse s) |
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
addActivationAndPropagate, changeNumberOfNeuronRefs, compareTo, getNeuronLabel, getThreadState, isRequired, processChanges, readNode, register, toString, weightsToStringreactivate, read, setModified, suspendpublic Synapse.Key key
public Neuron inputNeuron
public ReadWriteLock synapseLock
public InputNode()
public InputNode(Model m, Synapse.Key key)
public static InputNode add(Model m, Synapse.Key key, INeuron input)
protected NodeActivation<InputNode> createActivation(Document doc, NodeActivation.Key ak)
public void addActivation(Document doc, NodeActivation inputAct)
public void propagateAddedActivation(Document doc, NodeActivation act)
NodepropagateAddedActivation in class Node<InputNode,NodeActivation<InputNode>>public boolean isAllowedOption(int threadId,
InterpretationNode n,
NodeActivation act,
long v)
isAllowedOption in class Node<InputNode,NodeActivation<InputNode>>public void discover(Document doc, NodeActivation<InputNode> act, PatternDiscovery.Config config)
discover in class Node<InputNode,NodeActivation<InputNode>>public double computeSynapseWeightSum(Integer offset, INeuron n)
computeSynapseWeightSum in class Node<InputNode,NodeActivation<InputNode>>public void setSynapse(Synapse s)
public void removeSynapse(Synapse s)
public void cleanup()
cleanup in class Node<InputNode,NodeActivation<InputNode>>public void remove()
remove in class Node<InputNode,NodeActivation<InputNode>>public String logicToString()
logicToString in class Node<InputNode,NodeActivation<InputNode>>public void write(DataOutput out) throws IOException
Writableout.write in interface Writablewrite in class Node<InputNode,NodeActivation<InputNode>>out - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput in, Model m) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface WritablereadFields in class Node<InputNode,NodeActivation<InputNode>>in - DataInput to deseriablize this object from.IOExceptionCopyright © 2018. All rights reserved.