Class Synapse<S extends Synapse,I extends Neuron & Axon,O extends Neuron<?,OA>,L extends Link<S,IA,OA>,IA extends Activation,OA extends Activation>

java.lang.Object
network.aika.neuron.Synapse<S,I,O,L,IA,OA>
All Implemented Interfaces:
Writable
Direct Known Subclasses:
ConjunctiveSynapse, DisjunctiveSynapse

public abstract class Synapse<S extends Synapse,I extends Neuron & Axon,O extends Neuron<?,OA>,L extends Link<S,IA,OA>,IA extends Activation,OA extends Activation> extends Object implements Writable
Author:
Lukas Molzberger
  • Field Details

    • input

      protected NeuronProvider input
    • output

      protected NeuronProvider output
    • template

      protected S extends Synapse template
    • weight

      protected DoubleField weight
    • sampleSpace

      protected SampleSpace sampleSpace
    • frequencyIPosOPos

      protected double frequencyIPosOPos
    • frequencyIPosONeg

      protected double frequencyIPosONeg
    • frequencyINegOPos

      protected double frequencyINegOPos
    • allowTraining

      protected boolean allowTraining
  • Constructor Details

    • Synapse

      public Synapse()
  • Method Details

    • getLooseLinkingRange

      public Integer getLooseLinkingRange()
    • allowLooseLinking

      public boolean allowLooseLinking()
    • isRecurrent

      public boolean isRecurrent()
    • checkRelatedBindingSignal

      public boolean checkRelatedBindingSignal(BindingSignal iBS, BindingSignal oBS)
    • checkLinkingPreConditions

      public boolean checkLinkingPreConditions(IA iAct, OA oAct)
    • checkCommonLinkingPreConditions

      protected boolean checkCommonLinkingPreConditions(IA iAct, OA oAct)
    • linkExists

      public boolean linkExists(IA iAct, OA oAct)
    • checkTemplateLinkingPreConditions

      public boolean checkTemplateLinkingPreConditions(IA iAct, OA oAct)
    • checkTemplateInductionThreshold

      protected boolean checkTemplateInductionThreshold(OA oAct)
    • transition

      public BindingSignal transition(BindingSignal from, Direction dir, boolean propagate)
    • getPropagateTransitions

      public abstract List<Transition> getPropagateTransitions()
    • getCheckTransitions

      public abstract List<Transition> getCheckTransitions()
    • setModified

      public abstract void setModified()
    • allowPropagate

      public boolean allowPropagate(Activation act)
    • setInput

      public void setInput(I input)
    • setOutput

      public void setOutput(O output)
    • instantiateTemplate

      public S instantiateTemplate(I input, O output)
    • createLink

      public abstract L createLink(IA input, OA output)
    • initFromTemplate

      protected void initFromTemplate(S s)
    • setWeight

      public void setWeight(double w)
    • updateWeight

      public abstract void updateWeight(L l, double delta)
    • isAllowTraining

      public boolean isAllowTraining()
    • setAllowTraining

      public void setAllowTraining(boolean allowTraining)
    • isTemplate

      public boolean isTemplate()
    • getTemplate

      public Synapse getTemplate()
    • getTemplateInfo

      public TemplateSynapseInfo getTemplateInfo()
    • isOfTemplate

      public boolean isOfTemplate(Synapse templateSynapse)
    • getTemplateSynapseId

      public byte getTemplateSynapseId()
    • isInputLinked

      public boolean isInputLinked()
    • linkInput

      public void linkInput()
    • unlinkInput

      public void unlinkInput()
    • isOutputLinked

      public boolean isOutputLinked()
    • linkOutput

      public void linkOutput()
    • unlinkOutput

      public void unlinkOutput()
    • getPInput

      public NeuronProvider getPInput()
    • getPOutput

      public NeuronProvider getPOutput()
    • getInput

      public I getInput()
    • getOutput

      public O getOutput()
    • getSampleSpace

      public SampleSpace getSampleSpace()
    • getFrequency

      public double getFrequency(Sign is, Sign os, double n)
    • setFrequency

      public void setFrequency(Sign is, Sign os, double f)
    • applyMovingAverage

      public void applyMovingAverage(double alpha)
    • count

      public void count(Link l)
    • getModel

      public Model getModel()
    • getSurprisal

      public double getSurprisal(Sign si, Sign so, Range range, boolean addCurrentInstance)
    • getProbability

      public double getProbability(Sign si, Sign so, double n, boolean addCurrentInstance)
    • getWeight

      public DoubleField getWeight()
    • isZero

      public boolean isZero()
    • isNegative

      public boolean isNegative()
    • weightUpdate

      protected void weightUpdate(double u)
    • forAllLinks

      public void forAllLinks(Thought t, Consumer<Link> c)
    • write

      public void write(DataOutput out) throws IOException
      Description copied from interface: Writable
      Serialize the fields of this object to out.
      Specified by:
      write in interface Writable
      Parameters:
      out - DataOuput to serialize this object into.
      Throws:
      IOException
    • read

      public static Synapse read(DataInput in, Model m) throws IOException
      Throws:
      IOException
    • readFields

      public void readFields(DataInput in, Model m) throws IOException
      Description copied from interface: Writable
      Deserialize the fields of this object from in.

      For efficiency, implementations should attempt to re-use storage in the existing object where possible.

      Specified by:
      readFields in interface Writable
      Parameters:
      in - DataInput to deseriablize this object from.
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object