edu.stanford.nlp.optimization
Class PenaltyConstrainedMinimizer

java.lang.Object
  |
  +--edu.stanford.nlp.optimization.PenaltyConstrainedMinimizer
All Implemented Interfaces:
ConstrainedMinimizer, Minimizer

public class PenaltyConstrainedMinimizer
extends Object
implements ConstrainedMinimizer

A wrapper class which builds a constrained minimizer out of an unconstrained one by finding the unconstrained minimum of a sequence of penalized surfaces. It assumes that the objective it is given is a DiffFunction, even if the base unconstrained minimzer just ignores the derivative information. The desired unconstrained minimizer is passed in on construction: Minimizer m = new SomeUnconstrainedMinimizer(); ConstrainedMinimizer cm = new PenaltyConstrainedMinimizer(m);

Since:
1.0
See Also:
ConstrainedMinimizer

Constructor Summary
PenaltyConstrainedMinimizer(Minimizer minimizer)
           
 
Method Summary
 double[] minimize(Function function, double functionTolerance, double[] initial)
          Attempts to find an unconstrained minimum of the objective function starting at initial, within functionTolerance.
 double[] minimize(Function function, double functionTolerance, Function[] eqConstraints, double eqConstraintTolerance, Function[] ineqConstraints, double ineqConstraintTolerance, double[] initial)
          The general case, allowing both equality and inequality constraints.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PenaltyConstrainedMinimizer

public PenaltyConstrainedMinimizer(Minimizer minimizer)
Method Detail

minimize

public double[] minimize(Function function,
                         double functionTolerance,
                         Function[] eqConstraints,
                         double eqConstraintTolerance,
                         Function[] ineqConstraints,
                         double ineqConstraintTolerance,
                         double[] initial)
Description copied from interface: ConstrainedMinimizer
The general case, allowing both equality and inequality constraints. A given implementation can throw an UnsupportedOperationException if it cannot handle the constraints it is supplied. It is expected that minimize(function, functionTolerance, [], 0, [], 0, initial) behave exactly like the minimize(function, functionTolerance, initial) method inherited from Minimizer.

Specified by:
minimize in interface ConstrainedMinimizer
Parameters:
function - the objective function
functionTolerance - a double value
eqConstraints - an array of zero or more equality constraints
eqConstraintTolerance - the violation tolerace for equality constraints
ineqConstraints - an array of zero or more inequality constraints
ineqConstraintTolerance - the violation tolerace for equality constraints
initial - a initial feasible (!) point
Returns:
a minimizing feasible point

minimize

public double[] minimize(Function function,
                         double functionTolerance,
                         double[] initial)
Description copied from interface: Minimizer
Attempts to find an unconstrained minimum of the objective function starting at initial, within functionTolerance.

Specified by:
minimize in interface Minimizer
Parameters:
function - the objective function
functionTolerance - a double value
initial - a initial feasible point


Stanford NLP Group