edu.mit.sketch.geom
Class Segment

java.lang.Object
  |
  +--edu.mit.sketch.geom.Range
        |
        +--edu.mit.sketch.geom.Segment
All Implemented Interfaces:
Comparator

public class Segment
extends Range

This class represents a Point described by a java.awt.geom.Line2D.Double


Field Summary
 edu.mit.sketch.geom.Segment.SegmentCollection accumulated_segments
          SegmentCollection
 boolean included
          true if included
 Segment left
          left subsegment
 Segment parent
          left subsegment
 Segment right
          right subsegment
 double significance
          Significance of this segment
 Vertex[] vertices
          vertices
 
Fields inherited from class edu.mit.sketch.geom.Range
max, min
 
Constructor Summary
Segment()
          The constructor.
Segment(Vertex[] vertices, int min, int max)
          The constructor.
 
Method Summary
 void accumulateSegments()
          accumulate segments
 int adjustSignificance()
          override to preserve maximum significance of the segments in this collection
 void buildTree()
          build tree
 int[] getFeaturePointIndices()
          override to preserve maximum significance of the segments in this collection
 boolean subdivide()
          subdivide at the index with the maximum deviation return false if cannot be divided any further.
 String toString()
          Override toString
 
Methods inherited from class edu.mit.sketch.geom.Range
appendRanges, cloneRanges, compare, equals, vectorToArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

significance

public double significance
Significance of this segment

included

public boolean included
true if included

parent

public Segment parent
left subsegment

left

public Segment left
left subsegment

right

public Segment right
right subsegment

vertices

public Vertex[] vertices
vertices

accumulated_segments

public edu.mit.sketch.geom.Segment.SegmentCollection accumulated_segments
SegmentCollection
Constructor Detail

Segment

public Segment()
The constructor.

Segment

public Segment(Vertex[] vertices,
               int min,
               int max)
The constructor.
Method Detail

toString

public String toString()
Override toString
Overrides:
toString in class Range

subdivide

public boolean subdivide()
subdivide at the index with the maximum deviation return false if cannot be divided any further.

buildTree

public void buildTree()
build tree

accumulateSegments

public void accumulateSegments()
accumulate segments

getFeaturePointIndices

public int[] getFeaturePointIndices()
override to preserve maximum significance of the segments in this collection

adjustSignificance

public int adjustSignificance()
override to preserve maximum significance of the segments in this collection