edu.mit.sketch.ddg
Class AngleConstraint

java.lang.Object
  extended by edu.mit.sketch.ddg.Constraint
      extended by edu.mit.sketch.ddg.BinaryRelationshipConstraint
          extended by edu.mit.sketch.ddg.AngleConstraint
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class AngleConstraint
extends BinaryRelationshipConstraint
implements java.io.Serializable

This class represents the meets constraints for lines and ellipses.

AngleConstraint.java Created: Sat Nov 21 18:26:00 2001

Author:
Olya Veselova
See Also:
Serialized Form

Field Summary
static int NUM_CONSTRAINTS
          Total number of possible constraints (to allow iterating over the names)
static int PARALLEL
           
static int PERPENDICULAR
           
 
Constructor Summary
AngleConstraint()
          Constructs an empty constraint graph.
AngleConstraint(int name)
          Constructs an empty constraint graph.
 
Method Summary
 void addConstraints(java.util.HashMap primToGeomParts, double[][] obstruction, PrimitiveList primitives)
          Infer the constraints from the users stroke geom parts and add them to the constraint graph.
 java.lang.Object clone()
          Clone the constraint
static double constraintConfidence(Line l1, Line l2, int name)
          Returns the confidence that the constraint with the given name holds between two primitives
 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

PARALLEL

public static final int PARALLEL
See Also:
Constant Field Values

PERPENDICULAR

public static final int PERPENDICULAR
See Also:
Constant Field Values

NUM_CONSTRAINTS

public static final int NUM_CONSTRAINTS
Total number of possible constraints (to allow iterating over the names)

See Also:
Constant Field Values
Constructor Detail

AngleConstraint

public AngleConstraint()
Constructs an empty constraint graph.


AngleConstraint

public AngleConstraint(int name)
Constructs an empty constraint graph.

Method Detail

orientationInvariant

public boolean orientationInvariant()
Returns true if the constraint is orinetation invariant

Specified by:
orientationInvariant in class BinaryRelationshipConstraint

addConstraints

public void addConstraints(java.util.HashMap primToGeomParts,
                           double[][] obstruction,
                           PrimitiveList primitives)
Infer the constraints from the users stroke geom parts and add them to the constraint graph. HashMap: type of key: Primitive, type of value: GeometricObject


constraintConfidence

public static double constraintConfidence(Line l1,
                                          Line l2,
                                          int name)
Returns the confidence that the constraint with the given name holds between two primitives


name

public java.lang.String name()
Name of the constraint type

Specified by:
name in class BinaryRelationshipConstraint

clone

public java.lang.Object clone()
Clone the constraint

Specified by:
clone in class BinaryRelationshipConstraint