hep.aida.ref.optimizer
Class AbstractOptimizer
- java.lang.Object
-
- hep.aida.ref.optimizer.AbstractOptimizer
-
- All Implemented Interfaces:
- IOptimizer
- Direct Known Subclasses:
- FminOptimizer, JMinuitOptimizer, MinpackOptimizer, UncminOptimizer
public abstract class AbstractOptimizer extends java.lang.Object implements IOptimizer
Abstract implementation of IOptimizer
-
-
Constructor Summary
Constructors Constructor and Description AbstractOptimizer()Creates a new instance of AbstractOptimizer
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description booleanacceptsConstraints()Check if this IOptimizer accept constraints.double[][]calculateContour(java.lang.String par1, java.lang.String par2, int npts, double nSigmas)Calculate the contour for two given parameters.booleancanCalculateContours()Check if this IOptimizer can calculate contours.IOptimizerConfigurationconfiguration()Get the IOptimizer configurationjava.lang.String[]listVariableSettings()Get the list of the names of the IVariableSettings defined.abstract voidoptimize()Perform the optimization.voidreset()Reset the function, the domain of constraints and the internal configuration.voidresetVariableSettings()Reset all variable settings.IOptimizerResultresult()Get the optimization results.voidsetConfiguration(IOptimizerConfiguration configuration)Set the internal configuration of the Optimizer.voidsetConstraints(IDomainConstraint iDomainConstraint)Set the domain of constraints for the IOptimizer.voidsetFunction(IFunction iFunction)Set the IFunction to be optimized.IVariableSettingsvariableSettings(java.lang.String name)Get the IVariableSettings corresponding to a give variable.
-
-
-
Constructor Detail
-
AbstractOptimizer
public AbstractOptimizer()
Creates a new instance of AbstractOptimizer
-
-
Method Detail
-
configuration
public IOptimizerConfiguration configuration()
Get the IOptimizer configuration- Specified by:
configurationin interfaceIOptimizer- Returns:
- The configuration.
-
optimize
public abstract void optimize()
Perform the optimization.- Specified by:
optimizein interfaceIOptimizer
-
reset
public void reset()
Reset the function, the domain of constraints and the internal configuration.- Specified by:
resetin interfaceIOptimizer
-
result
public IOptimizerResult result()
Get the optimization results.- Specified by:
resultin interfaceIOptimizer- Returns:
- The result.
-
setConfiguration
public void setConfiguration(IOptimizerConfiguration configuration)
Set the internal configuration of the Optimizer.- Specified by:
setConfigurationin interfaceIOptimizer- Parameters:
configuration- The configuration.
-
setConstraints
public void setConstraints(IDomainConstraint iDomainConstraint)
Set the domain of constraints for the IOptimizer. If a domain of constraints already exists it will be overwritten.- Specified by:
setConstraintsin interfaceIOptimizer- Parameters:
iDomainConstraint- The domain of constraints.
-
setFunction
public void setFunction(IFunction iFunction)
Set the IFunction to be optimized. When setting a function the current configuration is reset.- Specified by:
setFunctionin interfaceIOptimizer- Parameters:
iFunction- The IFunction to be optimized.
-
listVariableSettings
public java.lang.String[] listVariableSettings()
Description copied from interface:IOptimizerGet the list of the names of the IVariableSettings defined.- Specified by:
listVariableSettingsin interfaceIOptimizer- Returns:
- The list of the names.
-
resetVariableSettings
public void resetVariableSettings()
Description copied from interface:IOptimizerReset all variable settings.- Specified by:
resetVariableSettingsin interfaceIOptimizer
-
variableSettings
public IVariableSettings variableSettings(java.lang.String name)
Description copied from interface:IOptimizerGet the IVariableSettings corresponding to a give variable. If the IVariableSettings does not exist, a new one is created.- Specified by:
variableSettingsin interfaceIOptimizer- Parameters:
name- The variable's name.- Returns:
- The corresponging IVariableSettings
-
acceptsConstraints
public boolean acceptsConstraints()
Description copied from interface:IOptimizerCheck if this IOptimizer accept constraints.- Specified by:
acceptsConstraintsin interfaceIOptimizer- Returns:
trueif the IOptimizer accepts contraints.falseotherwise.
-
canCalculateContours
public boolean canCalculateContours()
Description copied from interface:IOptimizerCheck if this IOptimizer can calculate contours.- Specified by:
canCalculateContoursin interfaceIOptimizer- Returns:
trueif the IOptimizer can calculate contours.falseotherwise.
-
calculateContour
public double[][] calculateContour(java.lang.String par1, java.lang.String par2, int npts, double nSigmas)Description copied from interface:IOptimizerCalculate the contour for two given parameters. The number of points and the number of sigmas can also be specified.- Specified by:
calculateContourin interfaceIOptimizer- Parameters:
par1- The name of the first parameter.par2- The name of the second parameter.npts- The number of points on the contour.nSigmas- The number of sigmas for this contour.- Returns:
- A double array of dimension [2][npts]. For each point on the contour the value of (par1,par2) is returned.
-
-
DMelt 3.0 © DataMelt by jWork.ORG