Class SimpleCurveFitter.ParameterGuesser

    • Method Detail

      • guess

        public abstract double[] guess​(Collection<WeightedObservedPoint> obs)
        Computes an estimation of the parameters.
        Parameters:
        obs - Observations.
        Returns:
        the guessed parameters.
      • findMaxY

        protected int findMaxY​(WeightedObservedPoint[] points)
        Finds index of point in specified points with the largest Y.
        Parameters:
        points - Points to search.
        Returns:
        the index in specified points array.
      • interpolateXAtY

        protected double interpolateXAtY​(WeightedObservedPoint[] points,
                                         int startIdx,
                                         int idxStep,
                                         double y)
        Interpolates using the specified points to determine X at the specified Y.
        Parameters:
        points - Points to use for interpolation.
        startIdx - Index within points from which to start the search for interpolation bounds points.
        idxStep - Index step for searching interpolation bounds points.
        y - Y value for which X should be determined.
        Returns:
        the value of X for the specified Y.
        Throws:
        ZeroException - if idxStep is 0.
        OutOfRangeException - if specified y is not within the range of the specified points.