44 #ifndef ROL_LINEARCOMBINATIONOBJECTIVE_H
45 #define ROL_LINEARCOMBINATIONOBJECTIVE_H
48 #include "ROL_Ptr.hpp"
55 const std::vector<ROL::Ptr<Objective<Real> > >
obj_;
76 for (
size_t i=0; i<
size_; ++i) {
77 obj_[i]->update(x,flag,iter);
83 for (
size_t i = 0; i <
size_; i++) {
95 for (
size_t i = 0; i <
size_; i++) {
107 for (
size_t i = 0; i <
size_; i++) {
117 for (
size_t i = 0; i <
size_; ++i) {
118 obj_[i]->setParameter(param);
Provides the interface to evaluate objective functions.
LinearCombinationObjective(const std::vector< Real > &weights, const std::vector< ROL::Ptr< Objective< Real > > > &obj)
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
const double weights[4][5]
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
ROL::Ptr< Vector< Real > > xdual_
LinearCombinationObjective(const std::vector< ROL::Ptr< Objective< Real > > > &obj)
virtual void setParameter(const std::vector< Real > ¶m)
void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update objective function.
std::vector< Real > weights_
void setParameter(const std::vector< Real > ¶m)
Real value(const Vector< Real > &x, Real &tol)
Compute value.
const std::vector< ROL::Ptr< Objective< Real > > > obj_
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.