Class Arc

java.lang.Object
  extended byArc

public class Arc
extends java.lang.Object

An Arc represents an active arc on the chart.


Field Summary
(package private)  int end
          The ending index of this Arc.
(package private)  int next
          The index of the next rhs constituent wanted by this Arc.
(package private)  int rhsLength
          The length of the rhs of the rule associated with this Arc.
(package private)  GrammarRule rule
          The rule this Arc is tracking.
(package private)  int start
          The starting index of this Arc.
 
Constructor Summary
Arc(GrammarRule rule, int start, int end, int next)
          Creates a new Arc with the given parameters.
 
Method Summary
 int getEnd()
          Returns the ending index of this Arc.
 int getNext()
          Returns the index of the next rhs constituent wanted by this Arc.
 Constituent getNextConstituent()
          Returns the next rhs constituent wanted by this Arc.
 GrammarRule getRule()
          Returns the rule this Arc is tracking.
 int getStart()
          Returns the starting index of this Arc.
 boolean isComplete()
          Returns true if this Arc is complete.
 java.lang.String toString()
          Returns the String representation of this Arc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rule

GrammarRule rule
The rule this Arc is tracking.


start

int start
The starting index of this Arc.


end

int end
The ending index of this Arc.


next

int next
The index of the next rhs constituent wanted by this Arc.


rhsLength

int rhsLength
The length of the rhs of the rule associated with this Arc.

Constructor Detail

Arc

public Arc(GrammarRule rule,
           int start,
           int end,
           int next)
Creates a new Arc with the given parameters.

Method Detail

getRule

public GrammarRule getRule()
Returns the rule this Arc is tracking.


getStart

public int getStart()
Returns the starting index of this Arc.


getEnd

public int getEnd()
Returns the ending index of this Arc.


getNext

public int getNext()
Returns the index of the next rhs constituent wanted by this Arc.


getNextConstituent

public Constituent getNextConstituent()
Returns the next rhs constituent wanted by this Arc.


isComplete

public boolean isComplete()
Returns true if this Arc is complete.


toString

public java.lang.String toString()
Returns the String representation of this Arc.