org.freehep.math.minuit
Class MnUserParameters

java.lang.Object
  extended by org.freehep.math.minuit.MnUserParameters

public class MnUserParameters
extends Object

API class for the user interaction with the parameters. Serves as input to the minimizer as well as output from it; users can interact: fix/release parameters, set values and errors, etc.; parameters can be accessed via their parameter number or via their user-specified name.

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

Constructor Summary
MnUserParameters()
          Creates a new instance of MnUserParameters
MnUserParameters(double[] par, double[] err)
           
 
Method Summary
 void add(String name, double val)
          Add const parameter name, value
 void add(String name, double val, double err)
          Add free parameter name, value, error
 void add(String name, double val, double err, double low, double up)
          Add limited parameter name, value, lower bound, upper bound
protected  MnUserParameters clone()
           
 double error(int index)
           
 double error(String name)
           
 void fix(int index)
          Fixes the specified parameter (so that the minimizer will no longer vary it)
 void fix(String name)
          Fixes the specified parameter (so that the minimizer will no longer vary it)
 MnMachinePrecision precision()
           
 void release(int index)
          Releases the specified parameter (so that the minimizer can vary it)
 void release(String name)
          Releases the specified parameter (so that the minimizer can vary it)
 void removeLimits(int index)
           
 void removeLimits(String name)
           
 void setError(int index, double err)
           
 void setError(String name, double err)
           
 void setLimits(int index, double low, double up)
          Set the lower and upper bound on the specified variable.
 void setLimits(String name, double low, double up)
          Set the lower and upper bound on the specified variable.
 void setLowerLimit(int index, double low)
           
 void setLowerLimit(String name, double low)
           
 void setPrecision(double eps)
           
 void setUpperLimit(int index, double up)
           
 void setUpperLimit(String name, double up)
           
 void setValue(int index, double val)
          Set the value of parameter.
 void setValue(String name, double val)
          Set the value of parameter.
 String toString()
           
 double value(int index)
           
 double value(String name)
           
 int variableParameters()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MnUserParameters

public MnUserParameters()
Creates a new instance of MnUserParameters


MnUserParameters

public MnUserParameters(double[] par,
                        double[] err)
Method Detail

clone

protected MnUserParameters clone()
Overrides:
clone in class Object

variableParameters

public int variableParameters()

add

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

When adding parameters, MINUIT assigns indices to each parameter which will be the same as in the double[] in the FCNBase.valueOf(). That means the first parameter the user adds gets index 0, the second index 1, and so on. When calculating the function value inside FCN, MINUIT will call FCNBase.valueOf() with the elements at their respective positions.


add

public void add(String name,
                double val,
                double err,
                double low,
                double up)
Add limited parameter name, value, lower bound, upper bound


add

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


fix

public void fix(int index)
Fixes the specified parameter (so that the minimizer will no longer vary it)


release

public void release(int index)
Releases the specified parameter (so that the minimizer can vary it)


setValue

public void setValue(int index,
                     double val)
Set the value of parameter. The parameter in question may be variable, fixed, or constant, but must be defined.


setError

public void setError(int index,
                     double err)

setLimits

public void setLimits(int index,
                      double low,
                      double up)
Set the lower and upper bound on the specified variable.


setUpperLimit

public void setUpperLimit(int index,
                          double up)

setLowerLimit

public void setLowerLimit(int index,
                          double low)

removeLimits

public void removeLimits(int index)

value

public double value(int index)

error

public double error(int index)

fix

public void fix(String name)
Fixes the specified parameter (so that the minimizer will no longer vary it)


release

public void release(String name)
Releases the specified parameter (so that the minimizer can vary it)


setValue

public void setValue(String name,
                     double val)
Set the value of parameter. The parameter in question may be variable, fixed, or constant, but must be defined.


setError

public void setError(String name,
                     double err)

setLimits

public void setLimits(String name,
                      double low,
                      double up)
Set the lower and upper bound on the specified variable.


setUpperLimit

public void setUpperLimit(String name,
                          double up)

setLowerLimit

public void setLowerLimit(String name,
                          double low)

removeLimits

public void removeLimits(String name)

value

public double value(String name)

error

public double error(String name)

precision

public MnMachinePrecision precision()

setPrecision

public void setPrecision(double eps)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2006 FreeHEP. All Rights Reserved.