public class AndNode extends Node<AndNode,NodeActivation<AndNode>>
InputNode and the AndNode classes 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.| Modifier and Type | Class and Description |
|---|---|
static class |
AndNode.Refinement |
Node.RidVisited, Node.ThreadState<T extends Node,A extends NodeActivation>| Modifier and Type | Field and Description |
|---|---|
boolean |
combinatorialExpensive |
int |
numCombExpParents |
SortedMap<AndNode.Refinement,Provider<? extends Node>> |
parents |
allOrChildren, andChildren, BEGIN_COMP, END_COMP, isDiscovered, level, lock, markedCreated, MAX_NODE, MAX_RELATIVE_RID, MIN_NODE, numberOfNeuronRefs, orChildren, reverseAndChildren, RID_COMP, statistic, threadslastUsedDocumentId, modified, provider| Constructor and Description |
|---|
AndNode() |
AndNode(Model m,
int level,
SortedMap<AndNode.Refinement,Provider<? extends Node>> parents) |
addActivation, clearActivations, clearActivations, clearActivations, compareTo, getActivations, getNeuronLabel, getThreadState, isRequired, postCreate, processChanges, readNode, register, toStringreactivate, read, setModified, suspendpublic SortedMap<AndNode.Refinement,Provider<? extends Node>> parents
public boolean combinatorialExpensive
public int numCombExpParents
public AndNode()
public AndNode(Model m, int level, SortedMap<AndNode.Refinement,Provider<? extends Node>> parents)
public void propagate(NodeActivation act)
AbstractNodepropagate in class AbstractNode<Provider<AndNode>,NodeActivation<AndNode>>public void cleanup()
cleanup in class Node<AndNode,NodeActivation<AndNode>>public void discover(NodeActivation<AndNode> act, PatternDiscovery.Config config)
discover in class Node<AndNode,NodeActivation<AndNode>>public static AndNode createNextLevelNode(Model m, int threadId, Document doc, Node n, AndNode.Refinement ref, PatternDiscovery.Config config)
public static void addNextLevelActivation(NodeActivation<AndNode> act, NodeActivation<AndNode> secondAct, Provider<AndNode> pnlp)
public void changeNumberOfNeuronRefs(int threadId,
long v,
int d)
changeNumberOfNeuronRefs in class Node<AndNode,NodeActivation<AndNode>>public static Collection<NodeActivation<?>> prepareInputActs(NodeActivation<?> firstAct, NodeActivation<?> secondAct)
public static SortedMap<AndNode.Refinement,Provider<? extends Node>> computeNextLevelParents(Model m, int threadId, Document doc, Node pa, AndNode.Refinement ref, PatternDiscovery.Config config)
public void reprocessInputs(Document doc)
reprocessInputs in class Node<AndNode,NodeActivation<AndNode>>public double computeSynapseWeightSum(Integer offset, INeuron n)
computeSynapseWeightSum in class Node<AndNode,NodeActivation<AndNode>>protected NodeActivation<AndNode> createActivation(Document doc, NodeActivation.Key ak)
public void remove()
remove in class Node<AndNode,NodeActivation<AndNode>>public String logicToString()
logicToString in class Node<AndNode,NodeActivation<AndNode>>public void write(DataOutput out) throws IOException
Writableout.write in interface Writablewrite in class Node<AndNode,NodeActivation<AndNode>>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<AndNode,NodeActivation<AndNode>>in - DataInput to deseriablize this object from.IOExceptionCopyright © 2018. All rights reserved.