Class LinearLeastSquaresViaNormalEquationBase

Object
AnchorBean<PointsFitter>
InitializableBean<PointsFitter, PointsInitialization>
PointsBean<PointsFitter>
PointsFitter
ConicFitterBase
LinearLeastSquaresViaNormalEquationBase
All Implemented Interfaces:
CompatibleWithMark

public abstract class LinearLeastSquaresViaNormalEquationBase extends ConicFitterBase
Base class for linear least squares fitting using the normal equation method.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    applyCoefficientsToMark(cern.colt.matrix.DoubleMatrix2D matrixV, Mark mark, Dimensions dimensions)
    Applies the calculated coefficients to the mark.
    protected abstract cern.colt.matrix.DoubleMatrix2D
    createDesignMatrix(List<Point3f> points)
    Creates the design matrix from the input points.
    void
    fit(List<Point3f> points, Mark mark, Dimensions dimensions)
     
    protected abstract int
    Returns the minimum number of points required for fitting.

    Methods inherited from class org.anchoranalysis.plugin.points.bean.fitter.ConicFitterBase

    assignTo, getInputPointShift, getScaleRadii, getShell, getSubtractRadii, setInputPointShift, setScaleRadii, setShell, setSubtractRadii

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.anchoranalysis.mpp.mark.CompatibleWithMark

    isCompatibleWith
  • Constructor Details

    • LinearLeastSquaresViaNormalEquationBase

      public LinearLeastSquaresViaNormalEquationBase()
  • Method Details

    • fit

      public void fit(List<Point3f> points, Mark mark, Dimensions dimensions) throws PointsFitterException
      Specified by:
      fit in class PointsFitter
      Throws:
      PointsFitterException
    • minNumPoints

      protected abstract int minNumPoints()
      Returns the minimum number of points required for fitting.
      Returns:
      the minimum number of points
    • applyCoefficientsToMark

      protected abstract void applyCoefficientsToMark(cern.colt.matrix.DoubleMatrix2D matrixV, Mark mark, Dimensions dimensions) throws PointsFitterException
      Applies the calculated coefficients to the mark.
      Parameters:
      matrixV - the matrix of coefficients
      mark - the Mark to update
      dimensions - the Dimensions of the image
      Throws:
      PointsFitterException - if there's an error applying the coefficients
    • createDesignMatrix

      protected abstract cern.colt.matrix.DoubleMatrix2D createDesignMatrix(List<Point3f> points)
      Creates the design matrix from the input points.
      Parameters:
      points - the list of Point3f to use for creating the design matrix
      Returns:
      the design matrix as a DoubleMatrix2D