Skip to content

Commit d0f70e9

Browse files
removed linksOutput
1 parent 3d766fc commit d0f70e9

File tree

5 files changed

+2
-38
lines changed

5 files changed

+2
-38
lines changed

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

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -441,21 +441,10 @@ public static Synapse createOrReplace(Document doc, Integer synapseId, Neuron in
441441
return synapse;
442442
}
443443

444-
public Set<Integer> linksOutput() {
445-
Set<Integer> results = new TreeSet<>();
446-
for(Map.Entry<Integer, Relation> me: relations.entrySet()) {
447-
Relation rel = me.getValue();
448-
if(me.getKey() == OUTPUT) {
449-
rel.linksOutputs(results);
450-
}
451-
}
452-
return results;
453-
}
454-
455444

456445
public boolean linksAnyOutput() {
457-
Set<Integer> tmp = linksOutput();
458-
return !tmp.isEmpty();
446+
// Output Relations are always PositionRelations.
447+
return relations.get(OUTPUT) != null;
459448
}
460449

461450

src/main/java/network/aika/neuron/relation/AncestorRelation.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ public void mapSlots(Map<Integer, Position> slots, Activation act) {
6464
}
6565

6666

67-
@Override
68-
public void linksOutputs(Set<Integer> results) {
69-
}
70-
71-
7267
private static boolean contains(Activation actA, Activation actB, long v) {
7368
if(!actA.checkVisited(v)) return false;
7469

src/main/java/network/aika/neuron/relation/MultiRelation.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,6 @@ public void mapSlots(Map<Integer, Position> slots, Activation act) {
110110
}
111111

112112

113-
@Override
114-
public void linksOutputs(Set<Integer> results) {
115-
for(Relation rel: relations) {
116-
rel.linksOutputs(results);
117-
}
118-
}
119-
120-
121113
@Override
122114
public boolean isExact() {
123115
for(Relation rel: relations) {

src/main/java/network/aika/neuron/relation/PositionRelation.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ public void mapSlots(Map<Integer, Position> slots, Activation act) {
5555
}
5656

5757

58-
@Override
59-
public void linksOutputs(Set<Integer> results) {
60-
results.add(toSlot);
61-
}
62-
63-
6458
@Override
6559
public int compareTo(Relation rel) {
6660
int r = super.compareTo(rel);

src/main/java/network/aika/neuron/relation/Relation.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ public interface RelationFactory {
8787

8888
public abstract void mapSlots(Map<Integer, Position> slots, Activation act);
8989

90-
public abstract void linksOutputs(Set<Integer> outputs);
91-
9290
public abstract Relation setOptionalAndFollow(boolean optional, boolean follow);
9391

9492

@@ -286,10 +284,6 @@ public Relation invert() {
286284
public void mapSlots(Map<Integer, Position> slots, Activation act) {
287285
}
288286

289-
@Override
290-
public void linksOutputs(Set<Integer> outputs) {
291-
}
292-
293287
@Override
294288
public boolean isExact() {
295289
return false;

0 commit comments

Comments
 (0)