FreeHEP API
Version current

hep.aida.ref.optimizer
Class AbstractOptimizerConfiguration

java.lang.Object
  extended byhep.aida.ref.optimizer.AbstractOptimizerConfiguration
All Implemented Interfaces:
IOptimizerConfiguration
Direct Known Subclasses:
FminOptimizerConfiguration, MinpackOptimizerConfiguration, MinuitOptimizerConfiguration, UncminOptimizerConfiguration

public abstract class AbstractOptimizerConfiguration
extends Object
implements IOptimizerConfiguration

Implementation of IOptimizerConfiguration for the AbstractOptimizer implementation

Author:
Tony Johnson, Victor Serbo, Max Turri
Source Code:
AbstractOptimizerConfiguration.java

Field Summary
 
Fields inherited from interface hep.aida.ext.IOptimizerConfiguration
CHI2_FIT_ERROR, DEFAULT_ERROR, DETAILED_OUTPUT, LOGL_FIT_ERROR, NO_OUTPUT, NORMAL_OUTPUT
 
Constructor Summary
AbstractOptimizerConfiguration()
           
 
Method Summary
 int errorDefinition()
          Get the optimizer's error definition.
 int maxIterations()
          Get the maximum number of iterations allowed before exiting the optimization procedure.
 String method()
          Get the method used by the optimizer in the optimization procedure.
 double precision()
          Get the internal precision of the Optimizer.
 int printLevel()
          Get the printout level.
 void setErrorDefinition(int errorDefinition)
          Tell the optmizer what kind of errors to calculate.
 void setMaxIterations(int maxIterations)
          Set the maximum number of iterations to be performed in the optimization procedure.
 void setMethod(String method)
          Set the method to be used by the optimizer in the optimization procedure.
 void setPrecision(double precision)
          Set the precision required in the optimizer's calculations.
 void setPrintLevel(int printLevel)
          Set the printout level.
 void setStrategy(int strategy)
          Set the strategy to be used by the optimizer in the optimization procedure.
 void setTitle(String title)
          Set the title for the current optimization problem.
 void setTolerance(double tolerance)
          Set the optimizer's tolerance.
 void setUseFunctionGradient(boolean useGradient)
          Specify if the optimizer has to use the gradient as provided by the IFunction.
 void setUseFunctionHessian(boolean useHessian)
          Specify if the optimizer has to use the Hessian as provided by the IFunction.
 int strategy()
          Get the strategy used by the optimizer in the optimization procedure.
 String title()
          Get the title.
 double tolerance()
          Get the optimizer's tolerance.
 boolean useFunctionGradient()
          See if the optimizer uses the IFunction's evaluation of the gradient.
 boolean useFunctionHessian()
          See if the optimizer uses the IFunction's evaluation of the Hessian.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractOptimizerConfiguration

public AbstractOptimizerConfiguration()
Method Detail

setErrorDefinition

public void setErrorDefinition(int errorDefinition)
                        throws IllegalArgumentException
Tell the optmizer what kind of errors to calculate.

Specified by:
setErrorDefinition in interface IOptimizerConfiguration
Parameters:
errorDefinition - The type of error to be calculated.
Throws:
IllegalArgumentException

errorDefinition

public int errorDefinition()
Get the optimizer's error definition.

Specified by:
errorDefinition in interface IOptimizerConfiguration
Returns:
The error definition.

setMaxIterations

public void setMaxIterations(int maxIterations)
Set the maximum number of iterations to be performed in the optimization procedure. If the optimizer did not converge before maxIter iterations the optimization will stop.

Specified by:
setMaxIterations in interface IOptimizerConfiguration
Parameters:
maxIterations - The maximum number of iterations.

maxIterations

public int maxIterations()
Get the maximum number of iterations allowed before exiting the optimization procedure.

Specified by:
maxIterations in interface IOptimizerConfiguration
Returns:
The maximum number of iterations.

setMethod

public void setMethod(String method)
Set the method to be used by the optimizer in the optimization procedure.

Specified by:
setMethod in interface IOptimizerConfiguration
Parameters:
method - The method to be adapted.

method

public String method()
Get the method used by the optimizer in the optimization procedure.

Specified by:
method in interface IOptimizerConfiguration
Returns:
The method used.

setPrecision

public void setPrecision(double precision)
Set the precision required in the optimizer's calculations. The highest possible is the machine's precision.

Specified by:
setPrecision in interface IOptimizerConfiguration
Parameters:
precision - The precision.
Returns:
true if the precision was set succesfully, false otherwise.

precision

public double precision()
Get the internal precision of the Optimizer.

Specified by:
precision in interface IOptimizerConfiguration
Returns:
The precision.

setPrintLevel

public void setPrintLevel(int printLevel)
Set the printout level.

Specified by:
setPrintLevel in interface IOptimizerConfiguration
Parameters:
printLevel - The printout level.
Returns:
true if the level was set succesfully, false otherwise.

printLevel

public int printLevel()
Get the printout level.

Specified by:
printLevel in interface IOptimizerConfiguration
Returns:
the printout level.

setStrategy

public void setStrategy(int strategy)
Set the strategy to be used by the optimizer in the optimization procedure.

Specified by:
setStrategy in interface IOptimizerConfiguration
Parameters:
strategy - The strategy.

strategy

public int strategy()
Get the strategy used by the optimizer in the optimization procedure.

Specified by:
strategy in interface IOptimizerConfiguration
Returns:
The strategy.

setTitle

public void setTitle(String title)
Set the title for the current optimization problem.

Specified by:
setTitle in interface IOptimizerConfiguration
Parameters:
title - The title.

title

public String title()
Get the title.

Specified by:
title in interface IOptimizerConfiguration
Returns:
The title.

setTolerance

public void setTolerance(double tolerance)
Set the optimizer's tolerance. The tolerance is used to determine if the optimizer converged to an optimal solution.

Specified by:
setTolerance in interface IOptimizerConfiguration
Parameters:
tolerance - The tolerance.
Returns:
true if the tolerance was set succesfully, false otherwise.

tolerance

public double tolerance()
Get the optimizer's tolerance.

Specified by:
tolerance in interface IOptimizerConfiguration
Returns:
The tolerance.

setUseFunctionGradient

public void setUseFunctionGradient(boolean useGradient)
Specify if the optimizer has to use the gradient as provided by the IFunction.

Specified by:
setUseFunctionGradient in interface IOptimizerConfiguration
Parameters:
useGradient - true if the Optimizer has to use the IFunction's calculation of the gradient, false otherwise.

useFunctionGradient

public boolean useFunctionGradient()
See if the optimizer uses the IFunction's evaluation of the gradient.

Specified by:
useFunctionGradient in interface IOptimizerConfiguration
Returns:
true if the optimizer uses the IFunction's evaluation of the gradient.

setUseFunctionHessian

public void setUseFunctionHessian(boolean useHessian)
Specify if the optimizer has to use the Hessian as provided by the IFunction.

Specified by:
setUseFunctionHessian in interface IOptimizerConfiguration
Parameters:
useHessian - true if the Optimizer has to use the IFunction's calculation of the Hessian, false otherwise.

useFunctionHessian

public boolean useFunctionHessian()
See if the optimizer uses the IFunction's evaluation of the Hessian.

Specified by:
useFunctionHessian in interface IOptimizerConfiguration
Returns:
true if the optimizer uses the IFunction's evaluation of the Hessian.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.