org.freehep.math.minuit
Class MnApplication

java.lang.Object
  extended by org.freehep.math.minuit.MnApplication
Direct Known Subclasses:
MnMigrad, MnMinimize, MnScan, MnSimplex

public abstract class MnApplication
extends Object

Base class for minimizers.

Version:
$Id: MnApplication.java 8584 2006-08-10 23:06:37Z duns $

Method Summary
 void add(String name, double val)
          add const parameter
 void add(String name, double val, double err)
          add free parameter
 void add(String name, double val, double err, double low, double up)
          add limited parameter
 boolean checkAnalyticalDerivatives()
           
 MnUserCovariance covariance()
           
 double error(int index)
           
 double error(String name)
           
 double errorDef()
           
 double[] errors()
           
 FCNBase fcnbase()
           
 void fix(int index)
           
 void fix(String name)
           
 int index(String name)
          convert name into external number of parameter
 FunctionMinimum minimize()
           
 FunctionMinimum minimize(int maxfcn)
           
 FunctionMinimum minimize(int maxfcn, double toler)
          Causes minimization of the FCN and returns the result in form of a FunctionMinimum.
 String name(int index)
          convert external number into name of parameter
 int numOfCalls()
           
 MnUserParameters parameters()
           
 double[] params()
          access to parameters and errors in column-wise representation
 MnMachinePrecision precision()
           
 void release(int index)
           
 void release(String name)
           
 void removeLimits(int index)
           
 void removeLimits(String name)
           
 void setCheckAnalyticalDerivatives(boolean check)
          Minuit does a check of the user gradient at the beginning, if this is not wanted the set this to "false".
 void setError(int index, double err)
           
 void setError(String name, double err)
           
 void setErrorDef(double errorDef)
          errorDef() is the error definition of the function.
 void setLimits(int index, double low, double up)
           
 void setLimits(String name, double low, double up)
           
 void setPrecision(double prec)
           
 void setUseAnalyticalDerivatives(boolean use)
          By default if the function to be minimized implements FCNGradientBase then the analytical gradient provided by the function will be used.
 void setValue(int index, double val)
           
 void setValue(String name, double val)
           
 MnUserParameterState state()
           
 MnStrategy strategy()
           
 boolean useAnalyticalDerivaties()
           
 double value(int index)
           
 double value(String name)
           
 int variableParameters()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

minimize

public FunctionMinimum minimize()

minimize

public FunctionMinimum minimize(int maxfcn)

minimize

public FunctionMinimum minimize(int maxfcn,
                                double toler)
Causes minimization of the FCN and returns the result in form of a FunctionMinimum.

Parameters:
maxfcn - specifies the (approximate) maximum number of function calls after which the calculation will be stopped even if it has not yet converged.
toler - specifies the required tolerance on the function value at the minimum. The default tolerance value is 0.1, and the minimization will stop when the estimated vertical distance to the minimum (EDM) is less than 0:001*tolerance*errorDef

precision

public MnMachinePrecision precision()

state

public MnUserParameterState state()

parameters

public MnUserParameters parameters()

covariance

public MnUserCovariance covariance()

fcnbase

public FCNBase fcnbase()

strategy

public MnStrategy strategy()

numOfCalls

public int numOfCalls()

params

public double[] params()
access to parameters and errors in column-wise representation


errors

public double[] errors()

add

public void add(String name,
                double val,
                double err)
add free parameter


add

public void add(String name,
                double val,
                double err,
                double low,
                double up)
add limited parameter


add

public void add(String name,
                double val)
add const parameter


fix

public void fix(int index)

release

public void release(int index)

setValue

public void setValue(int index,
                     double val)

setError

public void setError(int index,
                     double err)

setLimits

public void setLimits(int index,
                      double low,
                      double up)

removeLimits

public void removeLimits(int index)

value

public double value(int index)

error

public double error(int index)

fix

public void fix(String name)

release

public void release(String name)

setValue

public void setValue(String name,
                     double val)

setError

public void setError(String name,
                     double err)

setLimits

public void setLimits(String name,
                      double low,
                      double up)

removeLimits

public void removeLimits(String name)

setPrecision

public void setPrecision(double prec)

value

public double value(String name)

error

public double error(String name)

index

public int index(String name)
convert name into external number of parameter


name

public String name(int index)
convert external number into name of parameter


variableParameters

public int variableParameters()

setUseAnalyticalDerivatives

public void setUseAnalyticalDerivatives(boolean use)
By default if the function to be minimized implements FCNGradientBase then the analytical gradient provided by the function will be used. Set this to false to disable this behaviour and force numerical calculation of the gradient.


useAnalyticalDerivaties

public boolean useAnalyticalDerivaties()

setCheckAnalyticalDerivatives

public void setCheckAnalyticalDerivatives(boolean check)
Minuit does a check of the user gradient at the beginning, if this is not wanted the set this to "false".


checkAnalyticalDerivatives

public boolean checkAnalyticalDerivatives()

setErrorDef

public void setErrorDef(double errorDef)
errorDef() is the error definition of the function. E.g. is 1 if function is Chi2 and 0.5 if function is -logLikelihood. If the user wants instead the 2-sigma errors, errorDef() = 4, as Chi2(x+n*sigma) = Chi2(x) + n*n.


errorDef

public double errorDef()


Copyright © 2000-2006 FreeHEP. All Rights Reserved.