Skip to content

Commit f449496

Browse files
author
Lukas Molzberger
committed
fix npe
1 parent ff52e0d commit f449496

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main/java/network/aika/Document.java

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import network.aika.neuron.INeuron;
2525
import network.aika.neuron.Synapse;
2626
import network.aika.neuron.activation.Activation;
27-
import network.aika.neuron.activation.Activation.Link;
2827
import network.aika.neuron.activation.Activation.Option;
2928
import network.aika.neuron.activation.Candidate;
3029
import network.aika.neuron.activation.Position;

src/main/java/network/aika/neuron/INeuron.java

+6
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,12 @@ public void propagate(Activation act) {
551551

552552

553553
public int compareTo(INeuron n) {
554+
if (this == n) return 0;
555+
if (this == MIN_NEURON) return -1;
556+
if (n == MIN_NEURON) return 1;
557+
if (this == MAX_NEURON) return 1;
558+
if (n == MAX_NEURON) return -1;
559+
554560
if (provider.id < n.provider.id) return -1;
555561
else if (provider.id > n.provider.id) return 1;
556562
else return 0;

0 commit comments

Comments
 (0)