|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectup.Rule
up.BinaryRule
public class BinaryRule
A binary rule of a PCFG. This is a rule of the form A → B C.
Constructor Summary | |
---|---|
BinaryRule(int lhs,
int rhs1,
int rhs2)
Constructs a new binary rule. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Tests whether this rule is equal to the specified object. |
int |
getLHS()
Returns the left-hand side of this rule. |
int |
getRHS1()
Returns the first category on the right-hand side of this rule. |
int |
getRHS2()
Returns the second category on the right-hand side of this rule. |
int |
hashCode()
Returns the hash code of this rule. |
Methods inherited from class up.Rule |
---|
getScore, setScore |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryRule(int lhs, int rhs1, int rhs2)
lhs
- the left-hand side of the new rulerhs1
- the first category on the right-hand side of the new rulerhs2
- the second category on the right-hand side of the new ruleMethod Detail |
---|
public int getLHS()
Rule
getLHS
in class Rule
public int getRHS1()
public int getRHS2()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare with
true
iff this rule is equal to the specified objectpublic int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |