public abstract class Node extends Object implements Comparable<Node>
Modifier and Type | Field and Description |
---|---|
private double |
score
The score, unless getScore/setScore is overridden which is the case with interpretations,
so DO NOT ACCESS SCORE DIRECTLY, ALWAYS USE GET/SET
|
Constructor and Description |
---|
Node(double score) |
Modifier and Type | Method and Description |
---|---|
(package private) abstract void |
addSources(double weight,
Map<Source,SourceNode> sources)
Adds the sources at (and beneath) this node to the given
sparsely represented source vector, weighted by the score of this node
times the given weight from the parent path
|
int |
compareTo(Node other) |
double |
getScore()
Returns the normalized (0-1) score of this node
|
double |
increaseScore(double increment)
Increases this score by an increment and returns the new score
|
void |
setScore(double score)
Sets the normalized (0-1) score of this node
|
private double score
public double getScore()
public void setScore(double score)
public double increaseScore(double increment)
public int compareTo(Node other)
compareTo
in interface Comparable<Node>
abstract void addSources(double weight, Map<Source,SourceNode> sources)
Copyright © 2018. All rights reserved.