|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthu.birot.OTKit.dataType.Comparison
public class Comparison
A data structure that contains the typical result of comparing two candidates in Optimality Theory.
When comparing two candidates, one of them is better
(Candidate Comparison.better), the other one
is worse (Candidate Comparison.worse). There
is a constraint that contains the decisive violations
("highest ranked constraint with uncanceled violation
marks" or "fatal constraint"; Constraint Comparison.fatal).
Finally, the difference between how the two
candidates violate the fatal constraint ("number of
uncanceled marks", or the difference between the two
violation levels; double Comparison.difference) may also play a role.
Moreover, the boolean values Comparison.isBetterThan,
Comparison.isWorseThan and Comparison.areEquivalent
can also be useful.
Methods in otBuildingBlocks.Eval return instances of the class
Comparison, containing all possibly important information in one.
The goal is to minimize the number of times that the
method Constraint.value(Candidate) has to be called.
In practice, this method is mutable. But it is meant not to mute it...
Eval| Field Summary | |
|---|---|
boolean |
areEquivalent
True if the two candidates are equally harmonic; if they are
assigned the same violations for all constraints. |
Candidate |
better
The better candidate after the comparison. |
double |
difference
The difference in Harmony of the two candidates. |
Constraint |
fatal
The highest ranked constraint with uncanceled violation marks. |
boolean |
isBetterThan
True if the first candidate is more harmonic than the second one. |
boolean |
isWorseThan
True if the first candidate is less harmonic than the second one. |
Candidate |
worse
The less optimal candidate after the comparison. |
| Constructor Summary | |
|---|---|
Comparison()
|
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Candidate better
public Candidate worse
public Constraint fatal
public double difference
public boolean isBetterThan
True if the first candidate is more harmonic than the second one.
public boolean isWorseThan
True if the first candidate is less harmonic than the second one.
public boolean areEquivalent
True if the two candidates are equally harmonic; if they are
assigned the same violations for all constraints.
| Constructor Detail |
|---|
public Comparison()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||