hep.aida.ref.optimizer
Class AbstractOptimizerConfiguration
- java.lang.Object
-
- hep.aida.ref.optimizer.AbstractOptimizerConfiguration
-
- All Implemented Interfaces:
- IOptimizerConfiguration
- Direct Known Subclasses:
- FminOptimizerConfiguration, MinpackOptimizerConfiguration, UncminOptimizerConfiguration
public abstract class AbstractOptimizerConfiguration extends java.lang.Object implements IOptimizerConfiguration
Implementation of IOptimizerConfiguration for the AbstractOptimizer implementation
-
-
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
Constructors Constructor and Description AbstractOptimizerConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description interrorDefinition()Get the optimizer's error definition.intmaxIterations()Get the maximum number of iterations allowed before exiting the optimization procedure.java.lang.Stringmethod()Get the method used by the optimizer in the optimization procedure.doubleprecision()Get the internal precision of the Optimizer.intprintLevel()Get the printout level.voidsetErrorDefinition(int errorDefinition)Tell the optmizer what kind of errors to calculate.voidsetMaxIterations(int maxIterations)Set the maximum number of iterations to be performed in the optimization procedure.voidsetMethod(java.lang.String method)Set the method to be used by the optimizer in the optimization procedure.voidsetPrecision(double precision)Set the precision required in the optimizer's calculations.voidsetPrintLevel(int printLevel)Set the printout level.voidsetStrategy(int strategy)Set the strategy to be used by the optimizer in the optimization procedure.voidsetTitle(java.lang.String title)Set the title for the current optimization problem.voidsetTolerance(double tolerance)Set the optimizer's tolerance.voidsetUseFunctionGradient(boolean useGradient)Specify if the optimizer has to use the gradient as provided by the IFunction.voidsetUseFunctionHessian(boolean useHessian)Specify if the optimizer has to use the Hessian as provided by the IFunction.intstrategy()Get the strategy used by the optimizer in the optimization procedure.java.lang.Stringtitle()Get the title.doubletolerance()Get the optimizer's tolerance.booleanuseFunctionGradient()See if the optimizer uses the IFunction's evaluation of the gradient.booleanuseFunctionHessian()See if the optimizer uses the IFunction's evaluation of the Hessian.
-
-
-
Method Detail
-
setErrorDefinition
public void setErrorDefinition(int errorDefinition) throws java.lang.IllegalArgumentExceptionTell the optmizer what kind of errors to calculate.- Specified by:
setErrorDefinitionin interfaceIOptimizerConfiguration- Parameters:
errorDefinition- The type of error to be calculated.- Throws:
java.lang.IllegalArgumentException
-
errorDefinition
public int errorDefinition()
Get the optimizer's error definition.- Specified by:
errorDefinitionin interfaceIOptimizerConfiguration- 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:
setMaxIterationsin interfaceIOptimizerConfiguration- 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:
maxIterationsin interfaceIOptimizerConfiguration- Returns:
- The maximum number of iterations.
-
setMethod
public void setMethod(java.lang.String method)
Set the method to be used by the optimizer in the optimization procedure.- Specified by:
setMethodin interfaceIOptimizerConfiguration- Parameters:
method- The method to be adapted.
-
method
public java.lang.String method()
Get the method used by the optimizer in the optimization procedure.- Specified by:
methodin interfaceIOptimizerConfiguration- 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:
setPrecisionin interfaceIOptimizerConfiguration- Parameters:
precision- The precision.
-
precision
public double precision()
Get the internal precision of the Optimizer.- Specified by:
precisionin interfaceIOptimizerConfiguration- Returns:
- The precision.
-
setPrintLevel
public void setPrintLevel(int printLevel)
Set the printout level.- Specified by:
setPrintLevelin interfaceIOptimizerConfiguration- Parameters:
printLevel- The printout level.
-
printLevel
public int printLevel()
Get the printout level.- Specified by:
printLevelin interfaceIOptimizerConfiguration- 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:
setStrategyin interfaceIOptimizerConfiguration- Parameters:
strategy- The strategy.
-
strategy
public int strategy()
Get the strategy used by the optimizer in the optimization procedure.- Specified by:
strategyin interfaceIOptimizerConfiguration- Returns:
- The strategy.
-
setTitle
public void setTitle(java.lang.String title)
Set the title for the current optimization problem.- Specified by:
setTitlein interfaceIOptimizerConfiguration- Parameters:
title- The title.
-
title
public java.lang.String title()
Get the title.- Specified by:
titlein interfaceIOptimizerConfiguration- 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:
setTolerancein interfaceIOptimizerConfiguration- Parameters:
tolerance- The tolerance.
-
tolerance
public double tolerance()
Get the optimizer's tolerance.- Specified by:
tolerancein interfaceIOptimizerConfiguration- 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:
setUseFunctionGradientin interfaceIOptimizerConfiguration- Parameters:
useGradient-trueif the Optimizer has to use the IFunction's calculation of the gradient,falseotherwise.
-
useFunctionGradient
public boolean useFunctionGradient()
See if the optimizer uses the IFunction's evaluation of the gradient.- Specified by:
useFunctionGradientin interfaceIOptimizerConfiguration- Returns:
trueif 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:
setUseFunctionHessianin interfaceIOptimizerConfiguration- Parameters:
useHessian-trueif the Optimizer has to use the IFunction's calculation of the Hessian,falseotherwise.
-
useFunctionHessian
public boolean useFunctionHessian()
See if the optimizer uses the IFunction's evaluation of the Hessian.- Specified by:
useFunctionHessianin interfaceIOptimizerConfiguration- Returns:
trueif the optimizer uses the IFunction's evaluation of the Hessian.
-
-
DMelt 3.0 © DataMelt by jWork.ORG