Package network.aika.lattice
Class OrNode
- java.lang.Object
-
- network.aika.AbstractNode<Provider<T>>
-
- network.aika.lattice.Node<OrNode,OrActivation>
-
- network.aika.lattice.OrNode
-
- All Implemented Interfaces:
Comparable<Node>,Writable
public class OrNode extends Node<OrNode,OrActivation>
While several neurons might share a the same input-node or and-node, there is always a always a one-to-one relation between or-nodes and neurons. The only exceptions are the input neurons which have a one-to-one relation with the input-node. The or-nodes form a disjunction of one or more input-nodes or and-nodes.- Author:
- Lukas Molzberger
-
-
Field Summary
-
Fields inherited from class network.aika.AbstractNode
lastUsedDocumentId, modified, provider
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddActivation(OrEntry oe, NodeActivation inputAct)protected voidchangeNumberOfNeuronRefs(int threadId, long v, int d)voidcleanup()voiddelete(Set<String> modelLabels)RefValueexpand(int threadId, Document doc, Refinement ref)StringgetNeuronLabel()NeurongetOutputNeuron()StringlogicToString()protected voidpropagate(OrActivation act)Propagate an activation to the next node or the next neuron that is depending on the current node.voidreadFields(DataInput in, Model m)Deserialize the fields of this object fromin.voidreprocessInputs(Document doc)voidsetOutputNeuron(Neuron n)voidwrite(DataOutput out)Serialize the fields of this object toout.-
Methods inherited from class network.aika.lattice.Node
addActivation, clearActivations, clearActivations, clearActivations, clearThreadState, compareRank, compareTo, getActivations, isNeuron, isQueued, isRequired, postCreate, processChanges, propagateToOrNode, readNode, register, remove, setNotQueued, toString
-
Methods inherited from class network.aika.AbstractNode
addModelLabel, getLabel, getModelLabels, getProvider, reactivate, read, setModified, suspend
-
-
-
-
Constructor Detail
-
OrNode
public OrNode()
-
OrNode
public OrNode(Model m)
-
-
Method Detail
-
expand
public RefValue expand(int threadId, Document doc, Refinement ref)
-
addActivation
protected void addActivation(OrEntry oe, NodeActivation inputAct)
-
propagate
protected void propagate(OrActivation act)
Description copied from class:NodePropagate an activation to the next node or the next neuron that is depending on the current node.- Specified by:
propagatein classNode<OrNode,OrActivation>
-
cleanup
public void cleanup()
- Specified by:
cleanupin classNode<OrNode,OrActivation>
-
reprocessInputs
public void reprocessInputs(Document doc)
- Specified by:
reprocessInputsin classNode<OrNode,OrActivation>
-
delete
public void delete(Set<String> modelLabels)
- Specified by:
deletein classAbstractNode<Provider<OrNode>>
-
changeNumberOfNeuronRefs
protected void changeNumberOfNeuronRefs(int threadId, long v, int d)- Overrides:
changeNumberOfNeuronRefsin classNode<OrNode,OrActivation>
-
logicToString
public String logicToString()
- Specified by:
logicToStringin classNode<OrNode,OrActivation>
-
write
public void write(DataOutput out) throws IOException
Description copied from interface:WritableSerialize the fields of this object toout.- Specified by:
writein interfaceWritable- Overrides:
writein classNode<OrNode,OrActivation>- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException
-
readFields
public void readFields(DataInput in, Model m) throws IOException
Description copied from interface:WritableDeserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFieldsin interfaceWritable- Overrides:
readFieldsin classNode<OrNode,OrActivation>- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException
-
getNeuronLabel
public String getNeuronLabel()
- Overrides:
getNeuronLabelin classNode<OrNode,OrActivation>
-
setOutputNeuron
public void setOutputNeuron(Neuron n)
-
getOutputNeuron
public Neuron getOutputNeuron()
-
-