Class Fitter

  • All Implemented Interfaces:
    Function, Minimizable
    Direct Known Subclasses:
    ChiSquaredFitter, ChiSquaredFitter2D

    public abstract class Fitterextends Objectimplements Minimizable, Function
    An abstract fitter.

    Extensions of this class typically need to do the following:

    • provide the appropriate setData() methods or some other way of handling the measured data points;
    • override the addFunction() method if fitting children of Function or something entirely different;
    • implement the Minimizable.calculate() method to calculate the value of the appropriate likelihood function, given the data points and the set of Functions.

    • Constructor Detail

      • Fitter

        public Fitter()
    • Method Detail

      • removeAllFunctions

        public void removeAllFunctions()
        Removes all Functions from this Fitter. The Fitter may then be reused with existing data.
      • calculate

        public double calculate(double x)
        Returns the value of the sum of functions at the given point. Useful for plotting the fitted function after the fit converges.
        Specified by:
        calculate in interface Function
        x - the x coordinate to calculate the function at
        the value of the function at the given coordinate
      • getName

        public String getName()
        Returns a function name for this fitter. By default the name is created from the names of all functions. If setName() was called, that is returned instead.
        Specified by:
        getName in interface Function
        the name of the function
      • setName

        public void setName(String newname)
        Sets the function name for this fitter.
        Specified by:
        setName in interface Function
        newname - the new name for the function

SCaVis 2.2 © jWork.ORG