10#ifndef ROL_LOG_BARRIER_OBJECTIVE_H
11#define ROL_LOG_BARRIER_OBJECTIVE_H
31 ROL::Ptr<Vector<Real> > logx = x.
clone();
34 Elementwise::Logarithm<Real> log;
36 logx->applyUnary(log);
38 Elementwise::ReductionSum<Real> sum;
40 Real result = -(logx->reduce(sum));
50 Elementwise::Reciprocal<Real> reciprocal;
58 ROL::Ptr<Vector<Real> > dbyx = d.
clone();
61 struct Division :
public Elementwise::BinaryFunction<Real> {
62 Real
apply(
const Real &xc,
const Real &dc )
const {
67 dbyx->applyBinary( division, d );
69 Elementwise::ReductionSum<Real> sum;
71 return -dbyx->reduce(sum);
77 struct HessianApply :
public Elementwise::BinaryFunction<Real> {
78 Real
apply(
const Real &vc,
const Real &xc )
const {
Log barrier objective for interior point methods.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
Real dirDeriv(const Vector< Real > &x, const Vector< Real > &d, Real &tol)
Compute directional derivative.
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Provides the interface to evaluate objective functions.
Defines the linear algebra or vector space interface.
virtual void set(const Vector &x)
Set where .
virtual void applyUnary(const Elementwise::UnaryFunction< Real > &f)
virtual void applyBinary(const Elementwise::BinaryFunction< Real > &f, const Vector &x)
virtual void scale(const Real alpha)=0
Compute where .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
ROL::BlockOperator2Diagonal BlockOperator2 apply(V &Hv, const V &v, Real &tol) const