1717package org .aika .neuron .activation ;
1818
1919
20+ import org .aika .neuron .INeuron ;
2021import org .aika .neuron .activation .Linker .Direction ;
2122
2223import java .util .*;
@@ -48,19 +49,19 @@ public static void linkConflicts(Activation act, long v, Direction dir) {
4849 Activation oAct = (dir == INPUT ? act : sa .output );
4950 Activation iAct = (dir == INPUT ? sa .input : act );
5051
51- markConflicts (iAct , oAct , v );
52-
5352 addConflict (oAct , iAct , v );
5453 }
5554 }
5655 }
5756
5857
5958 private static void addConflict (Activation oAct , Activation iAct , long v ) {
60- if (iAct .markedConflict == v ) {
61- if (iAct != oAct ) {
62- add (oAct , iAct );
63- }
59+ if (oAct == iAct ) {
60+ return ;
61+ }
62+
63+ if (iAct .getINeuron ().type != INeuron .Type .INHIBITORY ) {
64+ add (oAct , iAct );
6465 } else {
6566 for (Activation .SynapseActivation sa : iAct .neuronInputs ) {
6667 if (!sa .synapse .key .isRecurrent ) {
@@ -71,16 +72,6 @@ private static void addConflict(Activation oAct, Activation iAct, long v) {
7172 }
7273
7374
74- private static void markConflicts (Activation iAct , Activation oAct , long v ) {
75- oAct .markedConflict = v ;
76- for (Activation .SynapseActivation sa : iAct .neuronOutputs ) {
77- if (sa .synapse .key .isRecurrent && sa .synapse .isNegative ()) {
78- sa .output .markedConflict = v ;
79- }
80- }
81- }
82-
83-
8475 public static Collection <Activation > getConflicting (Activation n ) {
8576 ArrayList <Activation > conflicts = new ArrayList <>();
8677 Conflicts .collectConflicting (conflicts , n );
0 commit comments