35#ifndef ROL_LOG_BARRIER_OBJECTIVE_H
36#define ROL_LOG_BARRIER_OBJECTIVE_H
56 ROL::Ptr<Vector<Real> > logx = x.
clone();
59 Elementwise::Logarithm<Real> log;
61 logx->applyUnary(log);
63 Elementwise::ReductionSum<Real> sum;
65 Real result = -(logx->reduce(sum));
75 Elementwise::Reciprocal<Real> reciprocal;
83 ROL::Ptr<Vector<Real> > dbyx = d.
clone();
86 struct Division :
public Elementwise::BinaryFunction<Real> {
87 Real
apply(
const Real &xc,
const Real &dc )
const {
92 dbyx->applyBinary( division, d );
94 Elementwise::ReductionSum<Real> sum;
96 return -dbyx->reduce(sum);
102 struct HessianApply :
public Elementwise::BinaryFunction<Real> {
103 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