Package diva.sketch.parser2d

This package provides basic 2D parsing based on graph grammars.

See:
          Description

Interface Summary
Constituent Constituent is a term borrowed from linguistics that refers to a natural grouping of language elements.
Relation An object that specifies a directed spatial relationship between two rectangles.
RelationConstraint An object that returns whether a pair of rectangles satisfies constraints on the values of a specified relation.
Rule A tree-structured grammar rule of the form: LHS => RHS Where LHS is a constituent string (non-terminal) and RHS is a programmatic pattern matching function that does some kind of graph or tree matching on the input constituent set.
 

Class Summary
AndConstraint A composite constraint that ANDs together the results of its child constraint objects.
AngleRelation Calculate the direction angle (between 0 and 2*PI) between user-specified sites on a pair of rectangles.
AreaRatioRelation Calculate the ratio of areas of the input rectangles.
BasicConstraint An object that returns whether a pair of rectangles satisfies constraints on the values of a specified relation.
BasicRule Basic rule is the implementation of the rule interface that is filled in declaratively by a user-defined grammar.
CompositeConstituent A default implementation for a non-terminal constituent.
ConstituentSet A set of constituents that supports 2D geometric queries.
DirectedRelation A directed relation is a relation where the value being calculated is relative to one of the rectangles in particular.
DistanceRelation Calculate the euclidean distance between given sites on pairs of input rectangles.
Grammar2dParser Reads in an XML file and parses it into an array of rules that make up a grammar.
Grammar2dWriter Write out a set of rules into an XML file.
HeightRatioRelation Calculate the ratio of heights of the input rectangles with the specified "whichNumerator" constructor argument as the numerator of the ratio.
OrConstraint A composite constraint that ORs together the results of its child constraint objects.
OverlapRelation Calculate the percentage of one of the rectangles that overlaps the other.
Parser2D A simple CFG parser for graph grammars.
RelationUtilities A set of static utilties for dealing with relationships between rectangles, specifying important sites on rectangles, or angular directions.
TerminalConstituent A default implementation for a terminal constituent.
WidthRatioRelation Calculate the ratio of widths of the input rectangles with the specified "whichNumerator" constructor argument as the numerator of the ratio.
 

Package diva.sketch.parser2d Description

This package provides basic 2D parsing based on graph grammars. It is similar to the diva.sketch.classification package in that it provides an algorithm used by sketch recognition but is quite general and is hence designed with no dependencies on any of the other sketch packages.