FreeHEP API
Version current

hep.aida.ext
Interface IOptimizer

All Known Implementing Classes:
AbstractOptimizer

public interface IOptimizer

Source Code:
IOptimizer.java

Method Summary
 boolean acceptsConstraints()
          Check if this IOptimizer accept constraints.
 double[][] calculateContour(String par1, String par2, int npts, double nSigmas)
          Calculate the contour for two given parameters.
 boolean canCalculateContours()
          Check if this IOptimizer can calculate contours.
 IOptimizerConfiguration configuration()
          Get the IOptimizer configuration
 String[] listVariableSettings()
          Get the list of the names of the IVariableSettings defined.
 void optimize()
          Perform the optimization.
 void reset()
          Reset the function, the domain of constraints and the internal configuration.
 void resetVariableSettings()
          Reset all variable settings.
 IOptimizerResult result()
          Get the optimization results.
 void setConfiguration(IOptimizerConfiguration config)
          Set the internal configuration of the Optimizer.
 void setConstraints(IDomainConstraint domainConstraint)
          Set the domain of constraints for the IOptimizer.
 void setFunction(hep.aida.IFunction function)
          Set the IFunction to be optimized.
 IVariableSettings variableSettings(String name)
          Get the IVariableSettings corresponding to a give variable.
 

Method Detail

setFunction

public void setFunction(hep.aida.IFunction function)
                 throws IllegalArgumentException
Set the IFunction to be optimized. When setting a function the current configuration is reset.

Parameters:
function - The IFunction to be optimized.
Returns:
true if the IFunction is set succesfully, false otherwise.
Throws:
IllegalArgumentException

setConstraints

public void setConstraints(IDomainConstraint domainConstraint)
                    throws IllegalArgumentException
Set the domain of constraints for the IOptimizer. If a domain of constraints already exists it will be overwritten.

Parameters:
domainConstraint - The domain of constraints.
Returns:
true if the IDomainConstraint is set succesfully, false otherwise.
Throws:
IllegalArgumentException

optimize

public void optimize()
Perform the optimization.

Returns:
true if the optimization was successfull, false otherwise.

result

public IOptimizerResult result()
Get the optimization results.

Returns:
The result.

reset

public void reset()
Reset the function, the domain of constraints and the internal configuration.


configuration

public IOptimizerConfiguration configuration()
Get the IOptimizer configuration

Returns:
The configuration.

setConfiguration

public void setConfiguration(IOptimizerConfiguration config)
                      throws IllegalArgumentException
Set the internal configuration of the Optimizer.

Parameters:
config - The configuration.
Throws:
IllegalArgumentException

variableSettings

public IVariableSettings variableSettings(String name)
Get the IVariableSettings corresponding to a give variable. If the IVariableSettings does not exist, a new one is created.

Parameters:
name - The variable's name.
Returns:
The corresponging IVariableSettings

listVariableSettings

public String[] listVariableSettings()
Get the list of the names of the IVariableSettings defined.

Returns:
The list of the names.

resetVariableSettings

public void resetVariableSettings()
Reset all variable settings.


acceptsConstraints

public boolean acceptsConstraints()
Check if this IOptimizer accept constraints.

Returns:
true if the IOptimizer accepts contraints. false otherwise.

canCalculateContours

public boolean canCalculateContours()
Check if this IOptimizer can calculate contours.

Returns:
true if the IOptimizer can calculate contours. false otherwise.

calculateContour

public double[][] calculateContour(String par1,
                                   String par2,
                                   int npts,
                                   double nSigmas)
Calculate the contour for two given parameters. The number of points and the number of sigmas can also be specified.

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.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.