Stefy

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
 

Constructor Detail

Chart

public Chart(int size,
             int depth)
Constructor.
Parameters:
size - of the chart
depth - 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.
Method Detail

clear

public void clear()

addEdge

public void addEdge(Rule e,
                    int from,
                    int to)
Adds an edge to the chart.
Parameters:
e - an edge
from - the from index
to - the to index

get_n

public int get_n()
Get the length of the chart (lastBreakPoint).
Returns:
the last break point (n)

Stefy

Submit a bug or feature
Copyright 1998-2004 Vlado Keselj. All Rights Reserved.