edu.mit.sketch.toolkit
Class Fit

java.lang.Object
  |
  +--edu.mit.sketch.toolkit.Fit
All Implemented Interfaces:
Comparator, Serializable

public class Fit
extends Object
implements Serializable, Comparator

This class represents a fit to a set of points. It has methods for finding the LSQ error.

See Also:
Serialized Form

Field Summary
 Vertex[] vertices
          The fit
 
Constructor Summary
Fit(Point[] original_points, Vertex[] vertices, double lsq_error)
          The constructor.
 
Method Summary
 int compare(Object o1, Object o2)
          Implement Comparator
 boolean equals(Object o1, Object o2)
          Implement Comparator
 double getLSQError()
          Get the LSQ error
 void paint(Graphics g)
          paint on g
 void paintWithCertainties(Graphics g)
          paint on g
 String toString()
          Implement toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

vertices

public Vertex[] vertices
The fit
Constructor Detail

Fit

public Fit(Point[] original_points,
           Vertex[] vertices,
           double lsq_error)
The constructor.
Method Detail

getLSQError

public double getLSQError()
Get the LSQ error

compare

public int compare(Object o1,
                   Object o2)
Implement Comparator
Specified by:
compare in interface Comparator

equals

public boolean equals(Object o1,
                      Object o2)
Implement Comparator

toString

public String toString()
Implement toString()
Overrides:
toString in class Object

paint

public void paint(Graphics g)
paint on g

paintWithCertainties

public void paintWithCertainties(Graphics g)
paint on g