File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/network/aika/neuron/activation Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1171,7 +1171,7 @@ public Activation getActivation() {
11711171 }
11721172
11731173
1174- public class Option {
1174+ public class Option implements Comparable < Option > {
11751175 public int snId ;
11761176 public State state ;
11771177 public Decision decision ;
@@ -1241,6 +1241,13 @@ public Activation getAct() {
12411241 public String toString () {
12421242 return " snId:" + snId + " d:" + decision + " cacheFactor:" + cacheFactor + " w:" + Utils .round (weight ) + " p:" + p + " " + state ;
12431243 }
1244+
1245+ @ Override
1246+ public int compareTo (Option o ) {
1247+ int r = Integer .compare (getAct ().getId (), o .getAct ().getId ());
1248+ if (r != 0 ) return r ;
1249+ return Integer .compare (snId , o .snId );
1250+ }
12441251 }
12451252
12461253
You can’t perform that action at this time.
0 commit comments