stefy
Class Chart
java.lang.Object
|
+--stefy.Chart
- public class Chart
- extends java.lang.Object
Chart class (RT) implements both charts used in the parsing
algorithm, the passive and active chart, are instances of the class
Chart. It provides method for efficiently adding and accessing
edges, i.e., instances of Rule.
Constructor Summary |
Chart()
Uses default value of size=1, depth=1. |
Chart(int size)
Uses default value of depth=1. |
Chart(int size,
int depth)
Constructor. |
Method Summary |
void |
addEdge(Rule e,
int from,
int to)
Adds an edge to the chart. |
void |
clear()
|
int |
get_n()
Get the length of the chart (lastBreakPoint). |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Chart
public Chart(int size,
int depth)
- Constructor.
- Parameters:
size
- of the chartdepth
- of the chart
Chart
public Chart(int size)
- Uses default value of depth=1.
Chart
public Chart()
- Uses default value of size=1, depth=1.
clear
public void clear()
addEdge
public void addEdge(Rule e,
int from,
int to)
- Adds an edge to the chart.
- Parameters:
e
- an edgefrom
- the from indexto
- the to index
get_n
public int get_n()
- Get the length of the chart (lastBreakPoint).
- Returns:
- the last break point (n)