46 #include "MoochoPack_NumFixedDepIndep_AddedStep.hpp"
47 #include "MoochoPack_moocho_algo_conversion.hpp"
48 #include "IterationPack_print_algorithm_step.hpp"
49 #include "AbstractLinAlgPack/src/AbstractLinAlgPack_SpVectorClass.hpp"
52 , poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)
54 NLPAlgo &algo = rsqp_algo(_algo);
55 NLPAlgoState &s = algo.rsqp_state();
57 EJournalOutputLevel olevel = algo.algo_cntr().journal_output_level();
58 std::ostream& out = algo.track().journal_out();
61 if( static_cast<int>(olevel) >= static_cast<int>(PRINT_ALGORITHM_STEPS) ) {
62 using IterationPack::print_algorithm_step;
63 print_algorithm_step( algo, step_poss, type, assoc_step_poss, out );
66 if( s.nu().updated_k(0) && s.nu().get_k(0).nz() ) {
69 indep = s.var_indep();
70 const SpVector &nu_k = s.nu().get_k(0);
72 for( SpVector::const_iterator itr = nu_k.begin(); itr != nu_k.end(); ++itr ) {
73 if( dep.in_range( itr->indice() + nu_k.offset() ) )
75 else if( indep.in_range( itr->indice() + nu_k.offset() ) )
80 if( static_cast<int>(olevel) >= static_cast<int>(PRINT_ALGORITHM_STEPS) ) {
81 out <<
"\nnum_dep_fixed = " << fixed_dep
82 <<
"\nnum_indep_fixed = " << fixed_indep << std::endl;
86 if( static_cast<int>(olevel) >= static_cast<int>(PRINT_ALGORITHM_STEPS) ) {
87 out <<
"\nnu not calculated for the kth iteration\n";
95 , poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss
96 , std::ostream& out,
const std::string& L )
const
99 << L <<
"*** Counts the number of fixed variables from "
100 "the dependent and independent sets\n";
bool do_step(Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)
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
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)