35 #ifndef ROL_LOG_BARRIER_OBJECTIVE_H 36 #define ROL_LOG_BARRIER_OBJECTIVE_H 54 Teuchos::RCP<Vector<Real> > logx = x.
clone();
57 struct Logarithm :
public Elementwise::UnaryFunction<Real> {
58 Real apply(
const Real &x )
const {
63 logx->applyUnary(log);
65 Elementwise::ReductionSum<Real> sum;
67 Real result = -(logx->reduce(sum));
77 struct Reciprocal :
public Elementwise::UnaryFunction<Real> {
78 Real apply(
const Real &x )
const {
89 Teuchos::RCP<Vector<Real> > dbyx = d.
clone();
92 struct Division :
public Elementwise::BinaryFunction<Real> {
93 Real apply(
const Real &x,
const Real &d )
const {
98 dbyx->applyBinary( division, d );
100 Elementwise::ReductionSum<Real> sum;
102 return -dbyx->reduce(sum);
108 struct HessianApply :
public Elementwise::BinaryFunction<Real> {
109 Real apply(
const Real &v,
const Real &x )
const {
122 #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 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.
virtual Teuchos::RCP< Vector > clone() const =0
Clone to make a new (uninitialized) 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)
Log barrier objective for interior point methods.
virtual void set(const Vector &x)
Set where .