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 {
91 #endif // ROL_LOG_BARRIER_OBJECTIVE_H
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Provides the interface to evaluate objective functions.
virtual void scale(const Real alpha)=0
Compute where .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void applyBinary(const Elementwise::BinaryFunction< Real > &f, const Vector &x)
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
Defines the linear algebra or vector space interface.
Real dirDeriv(const Vector< Real > &x, const Vector< Real > &d, Real &tol)
Compute directional derivative.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
virtual void applyUnary(const Elementwise::UnaryFunction< Real > &f)
ROL::DiagonalOperator apply
Log barrier objective for interior point methods.
virtual void set(const Vector &x)
Set where .