public class EarleyChart
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int row,
EarleyItem item)
Determine if an item is in the chart.
|
java.util.List<EarleyItem> |
get(int row)
Get a row from the chart.
|
int |
size()
How big is the chart?
|
public int size()
public java.util.List<EarleyItem> get(int row)
The chart will be enlarged if necessary.
row
- the row number (0-indexed).public boolean contains(int row, EarleyItem item)
This method will be faster than a linear search of the row.
row
- the row to searchitem
- the item to search form