- 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 AlgebraicLine
getLine()
Returns theAlgebraicLine
associated with this line fit.double[]
Returns the parameters [A, B, C] for theAlgebraicLine
associated with this line fit.int
getSize()
Returns the size of the point set used for calculating this line fit.default double
getSquaredOrthogonalError
(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 theAlgebraicLine
associated with this line fit. To be implemented by concrete classes.null
is returned if no fit was found.- Returns:
- algebraic line parameters [A, B, C]
- See Also:
-
getLine
Returns theAlgebraicLine
associated with this line fit.null
is returned if no fit was found.- Returns:
- an
AlgebraicLine
instance
-
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
-