up
Class ScoreChart

java.lang.Object
  extended by up.ScoreChart

public class ScoreChart
extends java.lang.Object

A chart that holds scores of spans.


Constructor Summary
ScoreChart(int nCategories, int nTokens)
          Construct a new chart.
 
Method Summary
 double get(int cat, int min, int max)
          Returns the score for the specified span in this chart.
 void set(int cat, int min, int max, double score)
          Replaces the backpointer for the specified span in this chart with the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoreChart

public ScoreChart(int nCategories,
                  int nTokens)
Construct a new chart.

Parameters:
nCategories - the number of categories that the chart should hold
nTokens - the number of tokens that the chart should hold
Method Detail

get

public double get(int cat,
                  int min,
                  int max)
Returns the score for the specified span in this chart.

Parameters:
cat - the syntactic category of the span
min - the leftmost position of the span
max - the rightmost position of the span
Returns:
the score for the specified span, or 0 in case this chart does not specify a score for the specified span

set

public void set(int cat,
                int min,
                int max,
                double score)
Replaces the backpointer for the specified span in this chart with the specified value.

Parameters:
cat - the syntactic category of the span
min - the leftmost position of the span
max - the rightmost position of the span
score - the new score for the specified span