63 lDFP(
int M,
bool useDefaultScaling =
true, Real Bscaling = Real(1))
64 :
Secant<Real>(M,useDefaultScaling,Bscaling) {}
73 std::vector<Ptr<Vector<Real>>> a(
state_->current+1);
74 std::vector<Ptr<Vector<Real>>> b(
state_->current+1);
75 Real bv(0), av(0), bs(0), as(0);
76 for (
int i = 0; i <=
state_->current; i++) {
78 b[i]->set(*(
state_->iterDiff[i]));
79 b[i]->scale(1.0/sqrt(
state_->product[i]));
87 for (
int j = 0; j < i; j++) {
89 bs = b[j]->apply(*(
state_->gradDiff[i]));
92 as = a[j]->apply(*(
state_->gradDiff[i]));
93 a[i]->axpy(-as,*a[j]);
96 as = a[i]->apply(*(
state_->gradDiff[i]));
97 a[i]->scale(one/sqrt(as));
123 std::vector<Real> alpha(
state_->current+1,
zero);
124 for (
int i =
state_->current; i>=0; i--) {
125 alpha[i] =
state_->gradDiff[i]->dot(Bv);
126 alpha[i] /=
state_->product[i];
127 Bv.
axpy(-alpha[i],(
state_->iterDiff[i])->dual());
131 Ptr<Vector<Real>> tmp = Bv.
clone();
136 for (
int i = 0; i <=
state_->current; i++) {
138 beta =
state_->iterDiff[i]->apply(Bv);
139 beta /=
state_->product[i];
140 Bv.
axpy((alpha[i]-beta),*(
state_->gradDiff[i]));
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
Provides interface for and implements limited-memory secant operators.
const Ptr< SecantState< Real > > state_
Defines the linear algebra or vector space interface.
virtual void set(const Vector &x)
Set where .
virtual void scale(const Real alpha)=0
Compute where .
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis,...
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
Provides definitions for limited-memory DFP operators.
lDFP(int M, bool useDefaultScaling=true, Real Bscaling=Real(1))
virtual void applyB0(Vector< Real > &Bv, const Vector< Real > &v) const
void applyH(Vector< Real > &Hv, const Vector< Real > &v) const
void applyB(Vector< Real > &Bv, const Vector< Real > &v) const
virtual void applyH0(Vector< Real > &Hv, const Vector< Real > &v) const