summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/intent
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-01-30 14:10:54 +0100
committerJon Bratseth <bratseth@verizonmedia.com>2019-01-30 14:10:54 +0100
commit66379a4cb632ca89296ee155f29b00dd8949f0ab (patch)
treec18172a02b00668be8581c39f290c3b3d99cf49b /container-search/src/main/java/com/yahoo/search/intent
parent1081269ed0e31e22f44d6bc87c66d4b30fda52f7 (diff)
Simplify
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/intent')
-rw-r--r--container-search/src/main/java/com/yahoo/search/intent/model/Node.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/intent/model/Node.java b/container-search/src/main/java/com/yahoo/search/intent/model/Node.java
index 74a9d63a995..98bfd588004 100644
--- a/container-search/src/main/java/com/yahoo/search/intent/model/Node.java
+++ b/container-search/src/main/java/com/yahoo/search/intent/model/Node.java
@@ -4,7 +4,7 @@ package com.yahoo.search.intent.model;
import java.util.Map;
/**
- * A node in the <a href="TODO">intent model tree</a>
+ * A node in the intent model tree
*
* @author bratseth
*/
@@ -17,24 +17,24 @@ public abstract class Node implements Comparable<Node> {
private double score;
public Node(double score) {
- this.score=score;
+ this.score = score;
}
/** Returns the normalized (0-1) score of this node */
public double getScore() { return score; }
/** Sets the normalized (0-1) score of this node */
- public void setScore(double score) { this.score=score; }
+ public void setScore(double score) { this.score = score; }
/** Increases this score by an increment and returns the new score */
public double increaseScore(double increment) {
- setScore(getScore()+increment);
+ setScore(getScore() + increment);
return getScore();
}
public int compareTo(Node other) {
- if (this.getScore()<other.getScore()) return 1;
- if (this.getScore()>other.getScore()) return -1;
+ if (this.getScore() < other.getScore()) return 1;
+ if (this.getScore() > other.getScore()) return -1;
return 0;
}
@@ -43,6 +43,6 @@ public abstract class Node implements Comparable<Node> {
* sparsely represented source vector, weighted by the score of this node
* times the given weight from the parent path
*/
- abstract void addSources(double weight,Map<Source,SourceNode> sources);
+ abstract void addSources(double weight, Map<Source, SourceNode> sources);
}