56 namespace LinAlgOpPack {
82 VectorMutable &d_k = s.d().set_k(0);
83 const Vector &Ypy_k = s.Ypy().get_k(0);
84 const Vector &Zpz_k = s.Zpz().get_k(0);
85 V_VpV( &d_k, Ypy_k, Zpz_k );
88 var_dep = s.var_dep(),
89 var_indep = s.var_indep();
94 <<
"\n(Ypy_k'*Zpz_k)/(||Ypy_k||2 * ||Zpz_k||2 + eps)\n"
95 <<
" = ("<<
dot(Ypy_k,Zpz_k)<<
")/("<<Ypy_k.norm_2()<<
" * "<<Zpz_k.norm_2()<<
" + "<<very_small<<
")\n"
96 <<
" = " <<
dot(Ypy_k,Zpz_k) / ( Ypy_k.norm_2() * Zpz_k.norm_2() + very_small ) <<
"\n";
105 out <<
"\n||d_k||inf = " << d_k.norm_inf();
107 out <<
"\n||d(var_dep)_k||inf = " << d_k.sub_view(var_dep)->norm_inf();
108 if( var_indep.size() )
109 out <<
"\n||d(var_indep)_k||inf = " << d_k.sub_view(var_indep)->norm_inf();
112 if( implicit_cast<int>(olevel) >= implicit_cast<int>(
PRINT_VECTORS) ) {
113 out <<
"\nd_k = \n" << d_k;
115 out <<
"\nd(var_dep)_k = \n" << *d_k.sub_view(var_dep);
117 if( implicit_cast<int>(ns_olevel) >= implicit_cast<int>(
PRINT_VECTORS) ) {
118 if( var_indep.size() )
119 out <<
"\nd(var_indep)_k = \n" << *d_k.sub_view(var_indep);
128 , std::ostream&
out,
const std::string& L )
const
131 << L <<
"*** Calculates the search direction d from Ypy and Zpz\n"
132 << L <<
"d_k = Ypy_k + Zpz_k \n";
rSQP Algorithm control class.
void print_step(const Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss, std::ostream &out, const std::string &leading_str) const
bool do_step(Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)
virtual std::ostream & journal_out() const
Return a reference to a std::ostream to be used to output debug information and the like...
EJournalOutputLevel
enum for journal output.
void V_VpV(VectorMutable *v_lhs, const V1 &V1_rhs1, const V2 &V2_rhs2)
Reduced space SQP state encapsulation interface.
void print_algorithm_step(const Algorithm &algo, Algorithm::poss_type step_poss, EDoStepType type, Algorithm::poss_type assoc_step_poss, std::ostream &out)
Prints to 'out' the algorithm step.
AlgorithmTracker & track()
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta=1.0)
v_lhs = alpha * op(M_rhs1) * v_rhs2 + beta * v_lhs (BLAS xGEMV)
TypeTo implicit_cast(const TypeFrom &t)
value_type dot(const Vector &v_rhs1, const Vector &v_rhs2)
result = v_rhs1' * v_rhs2
AbstractLinAlgPack::value_type value_type
Acts as the central hub for an iterative algorithm.
NLPAlgoState & rsqp_state()
<<std aggr>="">> members for algo_cntr
RangePack::Range1D Range1D
NLPAlgo & rsqp_algo(Algorithm &algo)
Convert from a Algorithm to a NLPAlgo.