up
Class BackpointerChart

java.lang.Object
  extended by up.BackpointerChart

public class BackpointerChart
extends java.lang.Object

A chart that holds backpointers.


Constructor Summary
BackpointerChart(int nCategories, int nTokens)
          Construct a new chart.
 
Method Summary
 Backpointer get(int cat, int min, int max)
          Returns the backpointer for the specified span in this chart.
 void set(int cat, int min, int max, Backpointer bp)
          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

BackpointerChart

public BackpointerChart(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 Backpointer get(int cat,
                       int min,
                       int max)
Returns the backpointer 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 backpointer for the specified span, or null in case this chart does not contain a backpointer for the specified span

set

public void set(int cat,
                int min,
                int max,
                Backpointer bp)
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
bp - the new backpointer for the specified span