|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.sketch.util.LinearFit
This class has useful functions for linear line matching. Some adapted from numerical recipes book.
| Field Summary | |
static int |
ROTATION_METHOD
Constant corresponding to deriving direction using sliding window and rotation mehod. |
static int |
SIMPLE_TANGENTS_METHOD
Constant corresponding to deriving direction using simple tangents. |
static int |
SWODR_METHOD
Constant corresponding to deriving direction using sliding window and the ODR package. |
| Constructor Summary | |
LinearFit()
|
|
| Method Summary | |
static double |
findAngle(double[] x,
double[] y)
Return the angle -- in radians -- that best approximates the slope of the line that best fits x, y data points. |
static double |
findAngle(double[] x,
double[] y,
int start_index,
int end_index)
Return the angle -- in radians -- that best approximates the slope of the line that best fits x, y data points. |
static double |
findAngle(double[] x,
double[] y,
int start_index,
int end_index,
int partitions)
Return the angle -- in radians -- that best approximates the slope of the line that best fits x, y data points. |
static double |
findAngle(Point[] points)
Return the angle -- in radians -- that best approximates the slope of the line that best fits the data points. |
static double |
findAngle2(double[] x,
double[] y,
int start_index,
int end_index,
int depth)
Return the angle -- in radians -- that best approximates the slope of the line that best fits x, y data points. |
static double |
findAngleViaODR(double[] x,
double[] y)
Do a linear fit. |
static double[] |
fit(double[] x,
double[] y)
Do a linear fit. |
static double[] |
fit2(double[] x,
double[] y)
Do a linear fit. |
static String |
fitMethodToString(int fit_method)
Return a String giving info about the fit method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SIMPLE_TANGENTS_METHOD
public static final int SWODR_METHOD
public static final int ROTATION_METHOD
| Constructor Detail |
public LinearFit()
| Method Detail |
public static double[] fit(double[] x,
double[] y)
public static double findAngle(double[] x,
double[] y,
int start_index,
int end_index,
int partitions)
public static double findAngle2(double[] x,
double[] y,
int start_index,
int end_index,
int depth)
public static double findAngle(double[] x,
double[] y,
int start_index,
int end_index)
public static double findAngle(Point[] points)
public static double findAngle(double[] x,
double[] y)
public static double[] fit2(double[] x,
double[] y)
public static double findAngleViaODR(double[] x,
double[] y)
public static String fitMethodToString(int fit_method)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||