52 #include "Teuchos_ParameterList.hpp" 69 Teuchos::RCP<StepState<Real> >
state_;
72 Teuchos::RCP<StepState<Real> >
getState(
void) {
100 state_->descentVec = s.
clone();
101 state_->gradientVec = g.
clone();
102 state_->searchSize = 0.0;
111 obj.
gradient(*(state_->gradientVec),x,tol);
114 Teuchos::RCP<Vector<Real> > xnew = x.
clone();
119 algo_state.
gnorm = xnew->norm();
122 algo_state.
gnorm = (state_->gradientVec)->norm();
184 virtual std::string
printName(
void )
const = 0;
192 virtual Teuchos::RCP<const StepState<Real> >
getStepState(
void)
const {
Provides the interface to evaluate objective functions.
virtual void compute(Vector< Real > &s, const Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)=0
Compute step.
virtual std::string printName(void) const =0
Print step name.
virtual Real value(const Vector< Real > &x, Real &tol)=0
Compute value.
Provides the interface to compute optimization steps.
virtual void compute(Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, EqualityConstraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
Compute step (equality constraints).
virtual void update(Vector< Real > &x, const Vector< Real > &s, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)=0
Update step, if successful.
Teuchos::RCP< StepState< Real > > state_
Teuchos::RCP< StepState< Real > > getState(void)
Contains definitions of custom data types in ROL.
virtual void update(Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Update step, if successful (equality constraints).
virtual Teuchos::RCP< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void compute(Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Compute step (equality constraints).
virtual void initialize(Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step with bound constraint.
virtual void update(Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, EqualityConstraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
Update step, if successful (equality constraints).
Defines the linear algebra or vector space interface.
State for algorithm class. Will be used for restarts.
virtual std::string print(AlgorithmState< Real > &algo_state, bool printHeader=false) const =0
Print iterate status.
virtual void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
bool isActivated(void)
Check if bounds are on.
Defines the equality constraint operator interface.
virtual Teuchos::RCP< const StepState< Real > > getStepState(void) const
Get state for step object.
State for step class. Will be used for restarts.
Provides the interface to apply upper and lower bound constraints.
virtual void initialize(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step with bound constraint.
virtual std::string printHeader(void) const =0
Print iterate header.
virtual void initialize(Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step with equality constraint.
virtual void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update objective function.
virtual void initialize(Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, EqualityConstraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
Initialize step with equality constraint.
virtual void project(Vector< Real > &x)
Project optimization variables onto the bounds.
static const double ROL_EPSILON
Platform-dependent machine epsilon.