hhreco.fragmentation
Class Basis

java.lang.Object
  extended byhhreco.fragmentation.Basis
Direct Known Subclasses:
EllipseBasis, LineBasis

public class Basis
extends java.lang.Object

A basis represents a basic unit of a shape, minimal yet perceptually relevant.


Field Summary
static int TYPE_ELLIPSE
          Elliptical arc type
static int TYPE_LINE
          Line segment type
 
Constructor Summary
Basis(double[] xvals_a, double[] yvals_a, int num_a, int type_a, double[] params_a, double fitError_a)
          Create a Basis object and initialize its attributes, the original points, number of points, the type of basis, parameters for the basis, and the fitting error resulting from the approximation of the original points with this basis.
 
Method Summary
 double getFitError()
          Return the fit error.
 int getNumPoints()
          Return the total number of original points.
 double[] getParams()
          Return the parameters of this basis.
 int getType()
          Return the type of this basis object.
 double[] getXvals()
          Return the X coordinates of the original points.
 double[] getYvals()
          Return the Y coordinates of the original points.
protected  void setFitError(double val)
          Set the fit error.
 java.lang.String toString()
          Text representation of this basis including its type, parameters, and fit error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_LINE

public static int TYPE_LINE
Line segment type


TYPE_ELLIPSE

public static int TYPE_ELLIPSE
Elliptical arc type

Constructor Detail

Basis

public Basis(double[] xvals_a,
             double[] yvals_a,
             int num_a,
             int type_a,
             double[] params_a,
             double fitError_a)
Create a Basis object and initialize its attributes, the original points, number of points, the type of basis, parameters for the basis, and the fitting error resulting from the approximation of the original points with this basis.

Method Detail

getXvals

public double[] getXvals()
Return the X coordinates of the original points.


getYvals

public double[] getYvals()
Return the Y coordinates of the original points.


getNumPoints

public int getNumPoints()
Return the total number of original points.


getType

public int getType()
Return the type of this basis object.


getParams

public double[] getParams()
Return the parameters of this basis.


getFitError

public double getFitError()
Return the fit error.


setFitError

protected void setFitError(double val)
Set the fit error.


toString

public java.lang.String toString()
Text representation of this basis including its type, parameters, and fit error.