|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.mit.sketch.ddg.Constraint
public abstract class Constraint
This abstract class represents the constraints on primitives. It contains a data structure that stores all the pairs of primitives between which a constraint holds. It provides methods dealing with this data structure that apply to any kinds of constraints. Subclasses should implement the methods that apply to particular constraints.
If the constraint represents a property instead of a relationship, the primitive will have a self loop in the constraint graph - the constraint holds between the primitive and itself.
Constraint.java Created: Sat Nov 21 18:26:00 2001
| Constructor Summary | |
|---|---|
Constraint()
Constructs an empty constraint graph. |
|
| Method Summary | |
|---|---|
abstract java.lang.Object |
clone()
Clone the constraint. |
ConstraintGraph |
constraintGraph()
Returns the constraint graph |
ConstraintGraphEdgeList |
labelledEdgeList()
Return the list of edges in the current constraint labelled with the name of a constraint. |
void |
mergeIn(Constraint other)
Put the constraints that are in other into this one, if they are not already in the graph |
abstract java.lang.String |
name()
Return the name of the constraint. |
abstract boolean |
orientationInvariant()
Returns true if the constraint is orinetation invariant |
void |
print(java.io.PrintStream out,
boolean printDetails)
Print the constraint: name, graph. |
void |
removeLowConfidence(double confidenceThreshold)
Remove constraints that are below the confidence threshold. |
void |
removeLowRelevance(double relevanceThreshold)
Remove constraints that are below the relevance threshold. |
void |
renamePrimitives(PrimitiveMapping mapping,
PrimitiveList relabelled)
Rename the primitives in the following constraint according to the given mapping. |
boolean |
sameAs(Constraint other,
PrimitiveMapping mapping)
Verifies whether this constraint is the same as the other one given the mapping between primitives. |
void |
setConstraintGraph(ConstraintGraph graph)
Sets the constraint graph |
Constraint |
subgraph(PrimitiveList primitiveList)
Return a new constraint that is a subgraph of this one only for the primitives in the given list. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Constraint()
| Method Detail |
|---|
public abstract java.lang.String name()
public abstract boolean orientationInvariant()
public ConstraintGraph constraintGraph()
public void setConstraintGraph(ConstraintGraph graph)
public ConstraintGraphEdgeList labelledEdgeList()
public void renamePrimitives(PrimitiveMapping mapping,
PrimitiveList relabelled)
public void mergeIn(Constraint other)
public void print(java.io.PrintStream out,
boolean printDetails)
public void removeLowConfidence(double confidenceThreshold)
public void removeLowRelevance(double relevanceThreshold)
public Constraint subgraph(PrimitiveList primitiveList)
public abstract java.lang.Object clone()
clone in class java.lang.Object
public boolean sameAs(Constraint other,
PrimitiveMapping mapping)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||