Class MSACPolynomialRobustEstimator

java.lang.Object
com.irurueta.numerical.polynomials.estimators.PolynomialRobustEstimator
com.irurueta.numerical.polynomials.estimators.MSACPolynomialRobustEstimator

public class MSACPolynomialRobustEstimator extends PolynomialRobustEstimator
Finds the best polynomial using RANSAC algorithm.
  • Field Details

    • DEFAULT_THRESHOLD

      public static final double DEFAULT_THRESHOLD
      Constant defining default threshold to determine whether polynomials are inliers or not. Threshold will be used to compare either algebraic or geometric distance of estimated polynomial respect each provided evaluation.
      See Also:
    • MIN_THRESHOLD

      public static final double MIN_THRESHOLD
      Minimum value that can be set as threshold. Threshold must be strictly greater than 0.0.
      See Also:
    • threshold

      private double threshold
      Threshold to determine whether polynomial evaluations are inliers or not when testing possible estimation solutions
  • Constructor Details

    • MSACPolynomialRobustEstimator

      public MSACPolynomialRobustEstimator()
      Constructor.
    • MSACPolynomialRobustEstimator

      public MSACPolynomialRobustEstimator(int degree)
      Constructor.
      Parameters:
      degree - degree of polynomial to be estimated.
      Throws:
      IllegalArgumentException - if provided degree is less than 1.
    • MSACPolynomialRobustEstimator

      public MSACPolynomialRobustEstimator(List<PolynomialEvaluation> evaluations)
      Constructor.
      Parameters:
      evaluations - collection of polynomial evaluations.
      Throws:
      IllegalArgumentException - if provided number of evaluations is less than the required minimum.
    • MSACPolynomialRobustEstimator

      public MSACPolynomialRobustEstimator(PolynomialRobustEstimatorListener listener)
      Constructor.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
    • MSACPolynomialRobustEstimator

      public MSACPolynomialRobustEstimator(int degree, List<PolynomialEvaluation> evaluations)
      Constructor.
      Parameters:
      degree - degree of polynomial to be estimated.
      evaluations - collection of polynomial evaluations.
      Throws:
      IllegalArgumentException - if provided degree is less than 1 or if provided number of evaluations is less than the required minimum for provided degree.
    • MSACPolynomialRobustEstimator

      public MSACPolynomialRobustEstimator(int degree, PolynomialRobustEstimatorListener listener)
      Constructor.
      Parameters:
      degree - degree of polynomial to be estimated.
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      Throws:
      IllegalArgumentException - if provided degree is less than 1.
    • MSACPolynomialRobustEstimator

      public MSACPolynomialRobustEstimator(List<PolynomialEvaluation> evaluations, PolynomialRobustEstimatorListener listener)
      Constructor.
      Parameters:
      evaluations - collection of polynomial evaluations.
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      Throws:
      IllegalArgumentException - if provided number of evaluations is less than the required minimum.
    • MSACPolynomialRobustEstimator

      public MSACPolynomialRobustEstimator(int degree, List<PolynomialEvaluation> evaluations, PolynomialRobustEstimatorListener listener)
      Constructor.
      Parameters:
      degree - degree of polynomial to be estimated.
      evaluations - collection of polynomial evaluations.
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      Throws:
      IllegalArgumentException - if provided degree is less than 1 or if provided number of evaluations is less than the required minimum for provided degree.
  • Method Details

    • getThreshold

      public double getThreshold()
      Returns threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.
      Returns:
      threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.
    • setThreshold

      public void setThreshold(double threshold) throws LockedException
      Sets threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.
      Parameters:
      threshold - threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.
      Throws:
      IllegalArgumentException - if provided value is equal or less than zero.
      LockedException - if robust estimator is locked.
    • estimate

      Estimates polynomial.
      Specified by:
      estimate in class PolynomialRobustEstimator
      Returns:
      estimated polynomial.
      Throws:
      LockedException - if robust estimator is locked because an estimation is already in progress.
      NotReadyException - if provided input data is not enough to start the estimation.
      RobustEstimatorException - if estimation fails for any other reason (i.e. numerical instability, no solution available, etc).
    • getMethod

      public RobustEstimatorMethod getMethod()
      Returns method being used for robust estimation.
      Specified by:
      getMethod in class PolynomialRobustEstimator
      Returns:
      method being used for robust estimation.