diff options
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.java | 14 |
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); } |