Skip to content

Commit e9bf730

Browse files
author
Lukas Molzberger
committed
moved search node
1 parent 4a617c6 commit e9bf730

File tree

6 files changed

+21
-25
lines changed

6 files changed

+21
-25
lines changed

src/main/java/org/aika/Document.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import org.aika.lattice.Node.ThreadState;
2222
import org.aika.neuron.*;
2323
import org.aika.neuron.activation.*;
24-
import org.aika.SearchNode.Weight;
25-
import org.aika.SearchNode.Decision;
24+
import org.aika.neuron.activation.SearchNode.Weight;
25+
import org.aika.neuron.activation.SearchNode.Decision;
2626
import org.aika.training.SupervisedTraining;
2727
import org.slf4j.Logger;
2828
import org.slf4j.LoggerFactory;
@@ -31,7 +31,7 @@
3131
import java.util.stream.Collectors;
3232
import java.util.stream.Stream;
3333

34-
import static org.aika.SearchNode.Decision.UNKNOWN;
34+
import static org.aika.neuron.activation.SearchNode.Decision.UNKNOWN;
3535

3636

3737
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import org.aika.*;
2121
import org.aika.neuron.activation.Activation;
2222
import org.aika.neuron.activation.Activation.State;
23-
import org.aika.SearchNode;
24-
import org.aika.SearchNode.Weight;
23+
import org.aika.neuron.activation.SearchNode;
24+
import org.aika.neuron.activation.SearchNode.Weight;
2525
import org.aika.lattice.InputNode;
2626
import org.aika.lattice.NodeActivation;
2727
import org.aika.lattice.OrNode;

src/main/java/org/aika/neuron/activation/Activation.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
package org.aika.neuron.activation;
22

33
import org.aika.Document;
4-
import org.aika.SearchNode;
54
import org.aika.Utils;
65
import org.aika.lattice.Node;
76
import org.aika.lattice.NodeActivation;
87
import org.aika.lattice.OrNode;
98
import org.aika.neuron.*;
109
import org.aika.neuron.activation.Linker.Direction;
11-
import org.aika.SearchNode.Weight;
12-
import org.aika.SearchNode.Decision;
10+
import org.aika.neuron.activation.SearchNode.Weight;
11+
import org.aika.neuron.activation.SearchNode.Decision;
1312
import org.slf4j.Logger;
1413
import org.slf4j.LoggerFactory;
1514

1615
import java.util.*;
1716

18-
import static org.aika.SearchNode.Decision.SELECTED;
17+
import static org.aika.neuron.activation.SearchNode.Decision.SELECTED;
1918
import static org.aika.neuron.activation.Activation.State.DIR;
2019
import static org.aika.neuron.activation.Activation.State.REC;
2120
import static org.aika.neuron.activation.Activation.SynapseActivation.INPUT_COMP;
@@ -71,7 +70,6 @@ public final class Activation extends NodeActivation<OrNode> {
7170
public Double inputValue;
7271

7372

74-
7573
public Decision inputDecision = Decision.UNKNOWN;
7674
public Decision decision = Decision.UNKNOWN;
7775
public Decision finalDecision = Decision.UNKNOWN;

src/main/java/org/aika/neuron/activation/Candidate.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package org.aika.neuron.activation;
22

3-
import org.aika.SearchNode;
43
import org.aika.Utils;
5-
import org.aika.SearchNode.Decision;
4+
import org.aika.neuron.activation.SearchNode.Decision;
65

76

87

src/main/java/org/aika/SearchNode.java renamed to src/main/java/org/aika/neuron/activation/SearchNode.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,20 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.aika;
17+
package org.aika.neuron.activation;
1818

1919

20-
import org.aika.neuron.activation.Activation;
20+
import org.aika.Document;
21+
import org.aika.Utils;
2122
import org.aika.neuron.activation.Activation.StateChange;
2223
import org.aika.neuron.activation.Activation.SynapseActivation;
2324
import org.aika.neuron.INeuron;
24-
import org.aika.neuron.activation.Candidate;
25-
import org.aika.neuron.activation.Conflicts;
2625
import org.slf4j.Logger;
2726
import org.slf4j.LoggerFactory;
2827

29-
import static org.aika.SearchNode.Decision.SELECTED;
30-
import static org.aika.SearchNode.Decision.EXCLUDED;
31-
import static org.aika.SearchNode.Decision.UNKNOWN;
28+
import static org.aika.neuron.activation.SearchNode.Decision.SELECTED;
29+
import static org.aika.neuron.activation.SearchNode.Decision.EXCLUDED;
30+
import static org.aika.neuron.activation.SearchNode.Decision.UNKNOWN;
3231
import static org.aika.neuron.activation.Activation.ACTIVATION_ID_COMP;
3332
import static org.aika.neuron.activation.Activation.Mode.NEW;
3433

@@ -58,11 +57,11 @@ public class SearchNode implements Comparable<SearchNode> {
5857

5958
public int id;
6059

61-
public SearchNode excludedParent;
62-
public SearchNode selectedParent;
60+
SearchNode excludedParent;
61+
SearchNode selectedParent;
6362

64-
public long visited;
65-
Candidate candidate;
63+
long visited;
64+
public Candidate candidate;
6665
int level;
6766

6867
DebugState debugState;
@@ -88,7 +87,7 @@ public enum DebugState {
8887
}
8988

9089
Weight weightDelta = Weight.ZERO;
91-
Weight accumulatedWeight = Weight.ZERO;
90+
public Weight accumulatedWeight = Weight.ZERO;
9291

9392
public Map<Activation, StateChange> modifiedActs = new TreeMap<>(ACTIVATION_ID_COMP);
9493

src/main/java/org/aika/training/MetaNetwork.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import java.util.*;
3131
import java.util.stream.Collectors;
3232

33-
import static org.aika.SearchNode.Decision.UNKNOWN;
33+
import static org.aika.neuron.activation.SearchNode.Decision.UNKNOWN;
3434

3535

3636
/**

0 commit comments

Comments
 (0)