edu.mit.sketch.geom
Class Approximation

java.lang.Object
  extended by edu.mit.sketch.geom.Approximation
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator

public class Approximation
extends java.lang.Object
implements java.io.Serializable, java.util.Comparator

This class represents a geometric object along with *SOME* error metric relating to the LSQ error.

See Also:
Serialized Form

Constructor Summary
Approximation(GeometricObject geometric_object, double error)
          The constructor.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Implement Comparator
 boolean equals(java.lang.Object o1, java.lang.Object o2)
          Implement Comparator
 double getError()
          Returns the error value of the Approximation class.
 GeometricObject getGeometricObject()
          Returns the geometricObject value of the Approximation class.
 void setError(double error)
          Sets the error value of the Approximation class.
 void setGeometricObject(GeometricObject geometricObject)
          Sets the geometricObject value of the Approximation class.
 java.lang.String toString()
          Implement toString()
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

Approximation

public Approximation(GeometricObject geometric_object,
                     double error)
The constructor.

Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Implement Comparator

Specified by:
compare in interface java.util.Comparator

equals

public boolean equals(java.lang.Object o1,
                      java.lang.Object o2)
Implement Comparator


toString

public java.lang.String toString()
Implement toString()

Overrides:
toString in class java.lang.Object

getError

public double getError()
Returns the error value of the Approximation class.

Returns:
Returns the error.

setError

public void setError(double error)
Sets the error value of the Approximation class.

Parameters:
error - The error to set.

getGeometricObject

public GeometricObject getGeometricObject()
Returns the geometricObject value of the Approximation class.

Returns:
Returns the geometricObject.

setGeometricObject

public void setGeometricObject(GeometricObject geometricObject)
Sets the geometricObject value of the Approximation class.

Parameters:
geometricObject - The geometricObject to set.