Package network.aika.lattice
Class AndNode
- java.lang.Object
-
- network.aika.AbstractNode<Provider<T>>
-
- network.aika.lattice.Node<AndNode,AndActivation>
-
- network.aika.lattice.AndNode
-
- All Implemented Interfaces:
Comparable<Node>,Writable
public class AndNode extends Node<AndNode,AndActivation>
TheInputNodeand theAndNodeclasses together form a pattern lattice, containing all possible substructures of any given conjunction. For example if we have the conjunction ABCD where A, B, C, D are the inputs, then the pattern lattice will contain the nodes ABCD, ABC, ABD, ACD, BCD, AB, AC, AD, BC, BD, CD, A, B, C, D. The pattern lattice is organized in layers, where each layer only contains conjunctions/patterns of the same size. These layers are connected through refinements. For example the and-node ABD on layer 3 is connected to the and-node ABCD on layer 4 via the refinement C.- Author:
- Lukas Molzberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAndNode.Entry
-
Field Summary
Fields Modifier and Type Field Description List<AndNode.Entry>parents-
Fields inherited from class network.aika.AbstractNode
lastUsedDocumentId, modified, provider
-
-
Constructor Summary
Constructors Constructor Description AndNode()AndNode(Model m, int level, List<AndNode.Entry> parents)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeNumberOfNeuronRefs(int threadId, long v, int d)voidcleanup()voiddelete(Set<String> modelLabels)StringlogicToString()protected voidpropagate(AndActivation 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.voidremove()voidreprocessInputs(Document doc)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, getNeuronLabel, isNeuron, isQueued, isRequired, postCreate, processChanges, propagateToOrNode, readNode, register, setNotQueued, toString
-
Methods inherited from class network.aika.AbstractNode
addModelLabel, getLabel, getModelLabels, getProvider, reactivate, read, setModified, suspend
-
-
-
-
Field Detail
-
parents
public List<AndNode.Entry> parents
-
-
Constructor Detail
-
AndNode
public AndNode()
-
AndNode
public AndNode(Model m, int level, List<AndNode.Entry> parents)
-
-
Method Detail
-
propagate
protected void propagate(AndActivation 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<AndNode,AndActivation>
-
delete
public void delete(Set<String> modelLabels)
- Specified by:
deletein classAbstractNode<Provider<AndNode>>
-
cleanup
public void cleanup()
- Specified by:
cleanupin classNode<AndNode,AndActivation>
-
changeNumberOfNeuronRefs
public void changeNumberOfNeuronRefs(int threadId, long v, int d)- Overrides:
changeNumberOfNeuronRefsin classNode<AndNode,AndActivation>
-
reprocessInputs
public void reprocessInputs(Document doc)
- Specified by:
reprocessInputsin classNode<AndNode,AndActivation>
-
remove
public void remove()
- Overrides:
removein classNode<AndNode,AndActivation>
-
logicToString
public String logicToString()
- Specified by:
logicToStringin classNode<AndNode,AndActivation>
-
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<AndNode,AndActivation>- 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<AndNode,AndActivation>- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException
-
-