diva.sketch.parser2d
Interface Relation

All Known Implementing Classes:
DirectedRelation, DistanceRelation

public abstract interface Relation

An object that specifies a directed spatial relationship between two rectangles. This relationship returns a scalar value, which can be used to check constraints, or as a feature for a classifier of some sort.

Version:
$Revision: 1.1 $

Method Summary
 double apply(java.awt.geom.Rectangle2D r1, java.awt.geom.Rectangle2D r2)
          Return the value of the relation extracted from the given rectangles.
 java.lang.String getName()
          Return the name of the relation extractor.
 

Method Detail

apply

public double apply(java.awt.geom.Rectangle2D r1,
                    java.awt.geom.Rectangle2D r2)
Return the value of the relation extracted from the given rectangles.

getName

public java.lang.String getName()
Return the name of the relation extractor.