FreeHEP API
Version v1.2.2

hep.aida.ref.optimizer
Class AbstractOptimizer

java.lang.Object
  |
  +--hep.aida.ref.optimizer.AbstractOptimizer
All Implemented Interfaces:
IOptimizer
Direct Known Subclasses:
FminOptimizer, MinpackOptimizer, MinuitOptimizer, UncminOptimizer

public abstract class AbstractOptimizer
extends Object
implements IOptimizer

Abstract implementation of IOptimizer

Author:
Tony Johnson, Victor Serbo, Max Turri

Field Summary
protected  IOptimizerConfiguration configuration
           
protected  IDomainConstraint domainConstraint
           
protected  hep.aida.IFunction function
           
protected  OptimizerResult result
           
 
Constructor Summary
AbstractOptimizer()
          Creates a new instance of AbstractOptimizer
 
Method Summary
 IOptimizerConfiguration configuration()
          Get the IOptimizer configuration
 String[] listVariableSettings()
          Get the list of the names of the IVariableSettings defined.
abstract  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 configuration)
          Set the internal configuration of the Optimizer.
 void setConstraints(IDomainConstraint iDomainConstraint)
          Set the domain of constraints for the IOptimizer.
 void setFunction(hep.aida.IFunction iFunction)
          Set the IFunction to be optimized.
 IVariableSettings variableSettings(String name)
          Get the IVariableSettings corresponding to a give variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

function

protected hep.aida.IFunction function

result

protected OptimizerResult result

configuration

protected IOptimizerConfiguration configuration

domainConstraint

protected IDomainConstraint domainConstraint
Constructor Detail

AbstractOptimizer

public AbstractOptimizer()
Creates a new instance of AbstractOptimizer

Method Detail

configuration

public IOptimizerConfiguration configuration()
Get the IOptimizer configuration

Specified by:
configuration in interface IOptimizer
Returns:
The configuration.

optimize

public abstract void optimize()
Perform the optimization.

Specified by:
optimize in interface IOptimizer
Returns:
true if the optimization was successfull, false otherwise.

reset

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

Specified by:
reset in interface IOptimizer

result

public IOptimizerResult result()
Get the optimization results.

Specified by:
result in interface IOptimizer
Returns:
The result.

setConfiguration

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

Specified by:
setConfiguration in interface IOptimizer
Parameters:
configuration - The configuration.
Returns:
true if the configuration was set succesfully, false otherwise.

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:
setConstraints in interface IOptimizer
Parameters:
iDomainConstraint - The domain of constraints.
Returns:
true if the IDomainConstraint is set succesfully, false otherwise.

setFunction

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

Specified by:
setFunction in interface IOptimizer
Parameters:
iFunction - The IFunction to be optimized.
Returns:
true if the IFunction is set succesfully, false otherwise.

listVariableSettings

public String[] listVariableSettings()
Description copied from interface: IOptimizer
Get the list of the names of the IVariableSettings defined.

Specified by:
listVariableSettings in interface IOptimizer
Returns:
The list of the names.

resetVariableSettings

public void resetVariableSettings()
Description copied from interface: IOptimizer
Reset all variable settings.

Specified by:
resetVariableSettings in interface IOptimizer

variableSettings

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

Specified by:
variableSettings in interface IOptimizer
Parameters:
name - The variable's name.
Returns:
The corresponging IVariableSettings

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.