public class AndNode extends Node
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 layers within the pattern lattice are connected trough 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.ReverseAndRefinement, Node.RidVisited, Node.RSKey, Node.Similarity, Node.ThreadState| Modifier and Type | Field and Description |
|---|---|
int |
frequencyNotify |
static int |
MAX_POS_NODES |
static int |
MAX_RID_RANGE |
int |
numberOfPositionsNotify |
SortedMap<AndNode.Refinement,Node> |
parents |
static double |
SIGNIFICANCE_THRESHOLD |
double |
weight |
andChildren, BEGIN_COMP, currentNodeId, END_COMP, endRequired, frequency, frequencyHasChanged, id, instanceSum, isBlocked, isQueued, isRemoved, isRemovedId, isRemovedIdCounter, level, LINK_NEURON_RELATIONS_OPTIMIZATION, lock, MAX_NODE, MAX_RID, MIN_NODE, minFrequency, neuron, nOffset, nullHypFreq, numberOfNeuronRefs, oldNullHypFreq, orChildren, passive, queueId, reverseAndChildren, RID_COMP, ridRequired, sizeSum, threads, visitedCounter| Constructor and Description |
|---|
AndNode() |
AndNode(Document doc,
int level,
SortedMap<AndNode.Refinement,Node> parents) |
addActivationAndPropagate, addActivationInternal, addAndChild, addConflict, addOrChild, adjust, clearActivations, clearActivations, compare, compareTo, computeAndParents, computeRefinements, count, getActivations, getAndChild, getFirstActivation, getThreadState, isFrequent, isPublic, isRequired, postProcessRemovedActivation, prepareResultsForPredefinedNodes, processAddedActivation, processChanges, processRemovedActivation, read, removeActivationAndPropagate, removeActivationInternal, removeAndChild, removeConflict, removeFromNextLevel, removeOrChild, toSimpleString, toStringpublic static double SIGNIFICANCE_THRESHOLD
public static int MAX_POS_NODES
public static int MAX_RID_RANGE
public SortedMap<AndNode.Refinement,Node> parents
public volatile int numberOfPositionsNotify
public volatile int frequencyNotify
public double weight
public AndNode()
public AndNode(Document doc, int level, SortedMap<AndNode.Refinement,Node> parents)
public boolean isAllowedOption(Document doc, InterprNode n, Activation act, long v)
isAllowedOption in class Nodeprotected Range preProcessAddedActivation(Document doc, Activation.Key ak, Collection<Activation> inputActs)
preProcessAddedActivation in class Nodepublic void addActivation(Document doc, Activation.Key ak, Collection<Activation> directInputActs)
protected static void removeActivation(Document doc, Activation iAct)
public void propagateAddedActivation(Document doc, Activation act, InterprNode removedConflict)
propagateAddedActivation in class Nodepublic void propagateRemovedActivation(Document doc, Activation act)
propagateRemovedActivation in class Nodeprotected boolean hasSupport(Activation act)
hasSupport in class Nodepublic void computeNullHyp(Model m)
computeNullHyp in class Nodepublic void updateWeight(Document doc, long v)
public int computeNotify(double x)
public double computeFMeasure(Node.Similarity sim, Neuron n)
public void apply(Document doc, Activation act, InterprNode removedConflict)
public void discover(Document doc, Activation act)
public boolean isExpandable(boolean checkFrequency)
isExpandable in class Nodepublic static AndNode createNextLevelNode(Document doc, Node n, AndNode.Refinement ref, boolean discoverPatterns)
public static void addNextLevelActivation(Document doc, Activation act, Activation secondAct, AndNode nlp, InterprNode conflict)
public static Collection<Activation> prepareInputActs(Activation firstAct, Activation secondAct)
public static SortedMap<AndNode.Refinement,Node> computeNextLevelParents(Document doc, Node pa, AndNode.Refinement ref, boolean discoverPatterns)
protected Collection<AndNode.Refinement> collectNodeAndRefinements(AndNode.Refinement newRef)
collectNodeAndRefinements in class Nodeprotected void changeNumberOfNeuronRefs(Document doc, long v, int d)
changeNumberOfNeuronRefs in class Nodepublic double computeSynapseWeightSum(Integer offset, Neuron n)
computeSynapseWeightSum in class Nodepublic void initActivation(Document doc, Activation act)
initActivation in class Nodepublic void deleteActivation(Document doc, Activation act)
deleteActivation in class Nodepublic String logicToString()
logicToString in class Nodepublic String weightsToString()
weightsToString in class Nodepublic void write(DataOutput out) throws IOException
Writableout.write in interface Writablewrite in class Nodeout - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput in, Document doc) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface WritablereadFields in class Nodein - DataInput to deseriablize this object from.IOExceptionCopyright © 2017. All rights reserved.