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 {
116 #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 .