- All Known Implementing Classes:
IncrementalLineFit,LinearRegressionFit,OrthogonalLineFitEigen,OrthogonalLineFitHomogeneous,OrthogonalLineFitSvd
public interface LineFit
Interface to be implemented by all 2D line fits.
- Version:
- 2022/09/22
-
Method Summary
Modifier and TypeMethodDescriptiondefault AlgebraicLinegetLine()Returns theAlgebraicLineassociated with this line fit.double[]Returns the parameters [A, B, C] for theAlgebraicLineassociated with this line fit.intgetSize()Returns the size of the point set used for calculating this line fit.default doublegetSquaredOrthogonalError(Pnt2d[] points) Calculates and returns the sum of the squared orthogonal distances of the specified points for this line fit.
-
Method Details
-
getSize
int getSize()Returns the size of the point set used for calculating this line fit.- Returns:
- the number of sample points used for fitting
-
getLineParameters
double[] getLineParameters()Returns the parameters [A, B, C] for theAlgebraicLineassociated with this line fit. To be implemented by concrete classes.nullis returned if no fit was found.- Returns:
- algebraic line parameters [A, B, C]
- See Also:
-
getLine
Returns theAlgebraicLineassociated with this line fit.nullis returned if no fit was found.- Returns:
- an
AlgebraicLineinstance
-
getSquaredOrthogonalError
Calculates and returns the sum of the squared orthogonal distances of the specified points for this line fit.- Parameters:
points- an array of 2D points- Returns:
- the squared orthogonal error
-