|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.mit.sketch.ddg.Constraint
edu.mit.sketch.ddg.PropertyConstraint
edu.mit.sketch.ddg.AspectRatioConstraint
public class AspectRatioConstraint
This class represents aspect ratio properties of ellipses and groups. (like "elongated"). If the property holds, the primitive will have a self loop in the constraint graph - the constraint holds between the primitive and itself.
AspectRatioConstraint.java Created: Sat Nov 21 18:26:00 2001
| Field Summary | |
|---|---|
static int |
ELONGATED
|
static int |
NON_ELONGATED
|
static int |
NUM_CONSTRAINTS
Total number of possible constraints (to allow iterating over the names). |
static int |
VERY_ELONGATED
|
| Constructor Summary | |
|---|---|
AspectRatioConstraint()
Constructs an empty constraint graph and initializes the name to "unknown". |
|
AspectRatioConstraint(int name)
Constructs an empty constraint graph with a given name |
|
| Method Summary | |
|---|---|
void |
addConstraints(java.util.HashMap primToGeomParts)
Infer the constraints for individual primitives from the user's stroke geometric parts and record add them to the constraint graph. |
void |
addConstraints(java.util.HashMap primToGeomParts,
GroupingTree group,
ConnectsConstraint connects,
IntersectsConstraint intersects)
Infer the constraints for groups from the user's stroke geometric parts and record add them to the constraint graph. |
java.lang.Object |
clone()
Clone the constraint |
static double |
constraintConfidence(DrawnObject object,
int name)
Returns the confidence that a given (by the name) constraint holds for a drawn object consisting of a group of primitives |
static double |
constraintConfidence(Ellipse e,
int name)
Returns the confidence that a given (by the name) constraint holds for an ellipse |
java.lang.String |
name()
Name of the constraint type. |
boolean |
orientationInvariant()
Returns true if the constraint is orinetation invariant |
| Methods inherited from class edu.mit.sketch.ddg.Constraint |
|---|
constraintGraph, labelledEdgeList, mergeIn, print, removeLowConfidence, removeLowRelevance, renamePrimitives, sameAs, setConstraintGraph, subgraph |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ELONGATED
public static final int VERY_ELONGATED
public static final int NON_ELONGATED
public static final int NUM_CONSTRAINTS
| Constructor Detail |
|---|
public AspectRatioConstraint()
public AspectRatioConstraint(int name)
| Method Detail |
|---|
public boolean orientationInvariant()
orientationInvariant in class PropertyConstraintpublic void addConstraints(java.util.HashMap primToGeomParts)
public void addConstraints(java.util.HashMap primToGeomParts,
GroupingTree group,
ConnectsConstraint connects,
IntersectsConstraint intersects)
public static double constraintConfidence(Ellipse e,
int name)
public static double constraintConfidence(DrawnObject object,
int name)
public java.lang.String name()
name in class PropertyConstraintpublic java.lang.Object clone()
clone in class PropertyConstraint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||