Class Activation

  • All Implemented Interfaces:
    java.lang.Comparable<Activation>

    public final class Activation
    extends java.lang.Object
    implements java.lang.Comparable<Activation>
    The Activation class is the most central class in Aika. On the one hand it stores the activation value for a given neuron in the State substructure. On the other hand it specifies where this activation is located within the document and to which interpretation it belongs. The Activation.Key therefore consists of the logic node to which this activation belongs. If this logic node is an or-node, then this activation automatically also belongs to the neuron as well. Furthermore, the key contains the char range within the document and the relational id (rid). The relational id might be used to store the word pos for instance. Lastly, the key contain the interpretation node of this activation, specifying to which interpretation this activation belongs.

    The activations are linked to each other on two levels. The fields inputs and outputs contain the activation links within the logic layer. The fields inputLinks and outputLinks contain the links on the neural layer.

    Author:
    Lukas Molzberger
    • Field Detail

      • BEGIN

        public static int BEGIN
      • END

        public static int END
      • ACTIVATION_ID_COMP

        public static final java.util.Comparator<Activation> ACTIVATION_ID_COMP
      • MAX_SELF_REFERENCING_DEPTH

        public static int MAX_SELF_REFERENCING_DEPTH
      • MAX_PREDECESSOR_DEPTH

        public static int MAX_PREDECESSOR_DEPTH
      • DEBUG_OUTPUT

        public static boolean DEBUG_OUTPUT
      • MIN_ACTIVATION

        public static Activation MIN_ACTIVATION
      • MAX_ACTIVATION

        public static Activation MAX_ACTIVATION
      • slots

        public java.util.Map<java.lang.Integer,​Position> slots
      • sequence

        public java.lang.Integer sequence
      • upperBound

        public double upperBound
      • lowerBound

        public double lowerBound
      • ubQueued

        public boolean ubQueued
      • markedHasCandidate

        public long markedHasCandidate
      • currentStateV

        public long currentStateV
      • markedDirty

        public long markedDirty
      • markedPredecessor

        public long markedPredecessor
      • targetValue

        public java.lang.Double targetValue
      • inputValue

        public java.lang.Double inputValue
      • markedAncDesc

        public long markedAncDesc
      • blocked

        public boolean blocked
    • Constructor Detail

      • Activation

        public Activation​(Document doc,
                          INeuron neuron,
                          java.util.Map<java.lang.Integer,​Position> slots)
    • Method Detail

      • setInputNodeActivation

        public void setInputNodeActivation​(OrNode.OrActivation inputNodeActivation)
      • getSlot

        public Position getSlot​(int slot)
      • length

        public java.lang.Integer length()
      • setTargetValue

        public void setTargetValue​(java.lang.Double targetValue)
      • getId

        public int getId()
      • getDocument

        public Document getDocument()
      • getThreadId

        public int getThreadId()
      • getNewVisitedId

        public long getNewVisitedId()
      • getVisitedId

        public long getVisitedId()
      • checkVisited

        public boolean checkVisited​(long v)
      • getLabel

        public java.lang.String getLabel()
      • getText

        public java.lang.String getText()
      • getINeuron

        public INeuron getINeuron()
      • getNeuron

        public Neuron getNeuron()
      • getSynapseById

        public Synapse getSynapseById​(int synapseId)
      • getLinkBySynapseId

        public Activation.Link getLinkBySynapseId​(int synapseId)
      • getInputLinks

        public java.util.stream.Stream<Activation.Link> getInputLinks​(boolean onlySelected)
      • getOutputLinks

        public java.util.stream.Stream<Activation.Link> getOutputLinks()
      • getInputLinksBySynapse

        public java.util.stream.Stream<Activation.Link> getInputLinksBySynapse​(Synapse syn)
      • getOutputLinksBySynapse

        public java.util.stream.Stream<Activation.Link> getOutputLinksBySynapse​(Synapse syn)
      • process

        public double process​(SearchNode sn,
                              int round,
                              long v)
      • computeValueAndWeight

        public Activation.State computeValueAndWeight​(int round)
      • isActiveable

        public boolean isActiveable()
      • processBounds

        public void processBounds()
      • computeBounds

        public void computeBounds()
      • hasUndecidedPositiveFeedbackLinks

        public boolean hasUndecidedPositiveFeedbackLinks()
      • getFinalInputActivationLinks

        public java.util.List<Activation.Link> getFinalInputActivationLinks()
      • getFinalOutputActivationLinks

        public java.util.List<Activation.Link> getFinalOutputActivationLinks()
      • getConflicts

        public java.util.Collection<Activation> getConflicts()
      • adjustSelectedNeuronInputs

        public void adjustSelectedNeuronInputs​(SearchNode.Decision d)
      • checkSelfReferencing

        public boolean checkSelfReferencing​(boolean onlySelected,
                                            int depth,
                                            long v)
      • isFinalActivation

        public boolean isFinalActivation()
      • getSequence

        public java.lang.Integer getSequence()
      • markDirty

        public void markDirty​(long v)
      • markPredecessor

        public void markPredecessor​(long v,
                                    int depth)
      • match

        public boolean match​(java.util.function.Predicate<Activation.Link> filter)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringDetailed

        public java.lang.String toStringDetailed()
      • compareTo

        public int compareTo​(Activation act)
        Specified by:
        compareTo in interface java.lang.Comparable<Activation>
      • slotsToString

        public java.lang.String slotsToString()
      • identityToString

        public java.lang.String identityToString()
      • linksToString

        public java.lang.String linksToString()
      • saveNewState

        public void saveNewState()