Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Code Block
borderStylesolid
// The AIDA Factories
IAnalysisFactory af = IAnalysisFactory.create();
IFitFactory fitf = af.createFitFactory();

// Create the fitter
IFitter fitter = fitf.createFitter("uml","jminuit");

Controlling

...

The Parameters

Function's parameters that enter the fit can be controlled via the IFitParameterSettings. These objects can be accessed at the fitter level by using the name of the parameter that they are meant to control. As they belong to the fitter, the fit parameter settings will apply to any fit in which there is a parameter that matches their name.
Throught the IFitParameterSettings it is possible to fix/release parameters, set their step size and their boundaries as shown in the following code:

Code Block
borderStylesolid
//  Fix parameter "a" and set it to be bounded in [0,1]
fitter.fitParameterSettings("a").setFixed(true);
fitter.fitParameterSettings("a").setBounds(0,1);

// Set the step size for parameter p0 to be 0.01
fitter.fitParameterSettings("p0").setStepSize(0.01);

Setting Constraints

At the fitter level it is also possible to set constraints. Even though the idea is to support pretty general constraints on the parameters and on the domain space, currently we only support very simple constraints: it is only possible to force one parameter to be identical to another:

Code Block
borderStylesolid

//  Set parameter "mean1" to be identical to "mean2"
fitter.setConstraint("mean1=mean2");