|
MoochoPack : Framework for Large-Scale Optimization Algorithms Version of the Day
|
00001 // @HEADER 00002 // *********************************************************************** 00003 // 00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization 00005 // Copyright (2003) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 // @HEADER 00028 00029 #ifndef LINE_SEARCH_FULL_STEP_AFTER_K_ITER_STEP_H 00030 #define LINE_SEARCH_FULL_STEP_AFTER_K_ITER_STEP_H 00031 00032 #include <limits> 00033 00034 #include "rSQPAlgo_StepBaseClasses.h" 00035 #include "ConstrainedOptPack_DirectLineSearch_Strategy.hpp" 00036 #include "Teuchos_StandardCompositionMacros.hpp" 00037 #include "MiStandardAggregationMacros.h" 00038 00039 namespace MoochoPack { 00040 00044 class LineSearchFullStepAfterKIter_Step : public LineSearch_Step { 00045 public: 00046 00048 STANDARD_COMPOSITION_MEMBERS(LineSearch_Step,line_search); 00049 00051 LineSearchFullStepAfterKIter_Step( 00052 const line_search_ptr_t& line_search = 0 00053 , int full_steps_after_k 00054 = std::numeric_limits<int>::max() ) 00055 : line_search_(line_search) 00056 , full_steps_after_k_(full_steps_after_k) 00057 {} 00058 00060 void full_steps_after_k( int full_steps_after_k ) 00061 { full_steps_after_k_ = full_steps_after_k; } 00063 value_type full_steps_after_k() const 00064 { return full_steps_after_k_; } 00065 00066 // //////////////////// 00067 // Overridden 00068 00070 bool do_step(Algorithm& algo, poss_type step_poss, IterationPack::EDoStepType type 00071 , poss_type assoc_step_poss); 00072 00074 void print_step( const Algorithm& algo, poss_type step_poss, IterationPack::EDoStepType type 00075 , poss_type assoc_step_poss, std::ostream& out, const std::string& leading_str ) const; 00076 00077 private: 00078 int full_steps_after_k_; 00079 00080 }; // end class LineSearchFullStepAfterKIter_Step 00081 00082 } // end namespace MoochoPack 00083 00084 #endif // LINE_SEARCH_FULL_STEP_AFTER_K_ITER_STEP_H
1.7.4