com.joptimizer.functions
Class LogarithmicBarrier
- java.lang.Object
-
- com.joptimizer.functions.LogarithmicBarrier
-
- All Implemented Interfaces:
- BarrierFunction, TwiceDifferentiableMultivariateRealFunction
public class LogarithmicBarrier extends java.lang.Object implements BarrierFunction
Default barrier function for the barrier method algorithm.
If f_i(x) are the inequalities of the problem, theh we have:
Φ = - Sum_i[log(-f_i(x))]- See Also:
- "S.Boyd and L.Vandenberghe, Convex Optimization, 11.2.1"
-
-
Constructor Summary
Constructors Constructor and Description LogarithmicBarrier(ConvexMultivariateRealFunction[] fi, int dim)Create the logarithmic barrier function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecalculatePhase1InitialFeasiblePoint(double[] originalNotFeasiblePoint, double tolerance)Calculates the initial value for the s parameter in Phase I.BarrierFunctioncreatePhase1BarrierFunction()Create the barrier function for the Phase I.intgetDim()Dimension of the function argument.doublegetDualityGap(double t)Calculates the duality gap for a barrier method build with this barrier function.double[]gradient(double[] X)Function gradient at point X.double[][]hessian(double[] X)Function hessian at point X.doublevalue(double[] X)Evaluation of the function at point X.
-
-
-
Constructor Detail
-
LogarithmicBarrier
public LogarithmicBarrier(ConvexMultivariateRealFunction[] fi, int dim)
Create the logarithmic barrier function.- See Also:
- "S.Boyd and L.Vandenberghe, Convex Optimization, 11.2.1"
-
-
Method Detail
-
value
public double value(double[] X)
Description copied from interface:TwiceDifferentiableMultivariateRealFunctionEvaluation of the function at point X.- Specified by:
valuein interfaceTwiceDifferentiableMultivariateRealFunction
-
gradient
public double[] gradient(double[] X)
Description copied from interface:TwiceDifferentiableMultivariateRealFunctionFunction gradient at point X.- Specified by:
gradientin interfaceTwiceDifferentiableMultivariateRealFunction
-
hessian
public double[][] hessian(double[] X)
Description copied from interface:TwiceDifferentiableMultivariateRealFunctionFunction hessian at point X.- Specified by:
hessianin interfaceTwiceDifferentiableMultivariateRealFunction
-
getDim
public int getDim()
Description copied from interface:TwiceDifferentiableMultivariateRealFunctionDimension of the function argument.- Specified by:
getDimin interfaceTwiceDifferentiableMultivariateRealFunction
-
getDualityGap
public double getDualityGap(double t)
Description copied from interface:BarrierFunctionCalculates the duality gap for a barrier method build with this barrier function.- Specified by:
getDualityGapin interfaceBarrierFunction
-
createPhase1BarrierFunction
public BarrierFunction createPhase1BarrierFunction()
Create the barrier function for the Phase I. It is a LogarithmicBarrier for the constraints:
fi(X)-s, i=1,...,n- Specified by:
createPhase1BarrierFunctionin interfaceBarrierFunction- See Also:
- "S.Boyd and L.Vandenberghe, Convex Optimization, 11.4.1"
-
calculatePhase1InitialFeasiblePoint
public double calculatePhase1InitialFeasiblePoint(double[] originalNotFeasiblePoint, double tolerance)Calculates the initial value for the s parameter in Phase I. Return s = max(fi(x))- Specified by:
calculatePhase1InitialFeasiblePointin interfaceBarrierFunction- See Also:
- "S.Boyd and L.Vandenberghe, Convex Optimization, 11.6.2"
-
-
DMelt 3.0 © DataMelt by jWork.ORG