20 #ifndef IPO_DETAIL_BARRIERFUNCTION_HPP
21 #define IPO_DETAIL_BARRIERFUNCTION_HPP
23 #include"../Model.hpp"
24 #include"../../ipo_function/DerivativesEstimates.hpp"
52 double const t = 0.1 );
57 virtual double operator()( gsl::vector
const& vector );
63 virtual gsl::vector
gradient( gsl::vector
const& vector );
69 virtual gsl::matrix
hessian( gsl::vector
const& vector );
74 virtual gsl::vector
gradient(){
return DerivativesEstimates::gradient(); }
79 virtual gsl::matrix
hessian(){
return DerivativesEstimates::hessian(); }
84 void set_t(
double const t );
96 virtual void setVector( gsl::vector
const& vector );
122 gsl::vector
const& vector );
131 bool const simul =
false );
144 gsl::vector& subvector,
double const&
lowerBound,
147 bool const simul =
false );
154 gsl::vector
const& vector );
174 gsl::vector& subvector,
double const&
lowerBound,
177 bool const simul =
false );
184 gsl::vector
const& vector );
virtual gsl::matrix hessian()
Get Hessian value from last call to setValue();.
void set_t(double const t)
Set t to a new value.
void updateHessianFromVariable(std::map< Variable, size_t >::value_type &entry, gsl::vector const &vector)
Update hessian from a variable.
Sign const sign
Set this to true or false according as the objective is to be added or subtracted.
double functionValue
The function value.
void updateResultFromVariable(std::map< Variable, size_t >::value_type &entry, gsl::vector const &vector)
Update result from a variable.
void initialiseHessianFromObjective(gsl::vector &subvector, bool const simul=false)
Update gradient from objective.
virtual void setVector(gsl::vector const &vector)
Set value of vector.
virtual double operator()(gsl::vector const &vector)
Evaluate the function.
gsl::vector updateGradientFromConstraint(size_t const constraintIndex, gsl::vector &subvector, double const &lowerBound, double const &functionValue, double const &upperBound, bool const simul=false)
Update gradient from a constraint.
Model & model
The value t used to determine the barrier.
Base class for derivative estimates with Hessian.
double t
The value t used to determine the barrier.
virtual gsl::vector gradient()
Get gradient value from last call to setValue();.
Class for a constraint function.
Model an interior-point optimisation problem.
double get_t() const
Get t value.
void updateResultFromConstraint(Constraint &constraint, gsl::vector &subvector, double const &lowerBound, double const &functionValue, double const &upperBound)
Update result from a constraint.
This class computes a function at a vector.
gsl::vector initialiseGradientFromObjective(gsl::vector &subvector, bool const simul=false)
Update gradient from objective.
Sign
Enumerated type used to determine sign of objective in BarrierFunction.
void updateHessianFromConstraint(size_t const constraintIndex, gsl::vector &subvector, double const &lowerBound, double const &functionValue, double const &upperBound, gsl::vector &gradient, bool const simul=false)
Update Hessian from a constraint.
BarrierFunction(Model &model, Sign const sign=Sign::positive, double const t=0.1)
The constructor needs a Model.
Function for the logarithmic barrier.
void initialiseResultFromObjective(gsl::vector &subvector, bool const simul=false)
Update result from objective.
void updateGradientFromVariable(std::map< Variable, size_t >::value_type &entry, gsl::vector const &vector)
Update gradient from a variable.
This namespace holds all the interior-point optimisation classes.