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 Type
    Method
    Description
    Returns the AlgebraicLine associated with this line fit.
    double[]
    Returns the parameters [A, B, C] for the AlgebraicLine associated with this line fit.
    int
    Returns the size of the point set used for calculating this line fit.
    default double
    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 the AlgebraicLine 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 the AlgebraicLine associated with this line fit. null is returned if no fit was found.
      Returns:
      an AlgebraicLine instance
    • getSquaredOrthogonalError

      default double getSquaredOrthogonalError(Pnt2d[] points)
      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