|
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 RSQP_TRACK_SUMMARY_STD_H 00030 #define RSQP_TRACK_SUMMARY_STD_H 00031 00032 #include "MoochoPack_quasi_newton_stats.hpp" 00033 #include "MoochoPack_qp_solver_stats.hpp" 00034 #include "MoochoPack_act_set_stats.hpp" 00035 #include "IterationPack_AlgorithmTracker.hpp" 00036 00037 namespace MoochoPack { 00038 00042 class MoochoTrackerSummaryStd 00043 : public IterationPack::AlgorithmTracker 00044 { 00045 public: 00046 00048 enum EOptError { OPT_ERROR_REDUCED_GRADIENT_LAGR, OPT_ERROR_GRADIENT_LAGR }; 00049 00051 MoochoTrackerSummaryStd( 00052 const ostream_ptr_t &o 00053 ,const ostream_ptr_t &journal_out 00054 ,EOptError opt_error = OPT_ERROR_REDUCED_GRADIENT_LAGR 00055 ); 00056 00058 void set_output_stream(const ostream_ptr_t& o); 00059 00061 const ostream_ptr_t& get_output_stream() const; 00062 00066 int num_total_qp_iter() const 00067 { return num_total_qp_iter_; } 00068 00071 00073 void output_iteration(const Algorithm& algo) const; 00075 void output_final(const Algorithm& algo, EAlgoReturn algo_return) const; 00076 00078 00079 protected: 00080 00082 void print_header(const NLPAlgoState &s) const; 00083 00084 std::ostream& o() const 00085 { return *o_; } 00086 00087 private: 00088 ostream_ptr_t o_; 00089 EOptError opt_error_; 00090 mutable int num_total_qp_iter_; 00091 quasi_newton_stats_iq_member quasi_newton_stats_; 00092 qp_solver_stats_iq_member qp_solver_stats_; 00093 act_set_stats_iq_member act_set_stats_; 00094 00095 // Not defined and not to be called 00096 MoochoTrackerSummaryStd(); 00097 00098 }; // end class MoochoTrackerSummaryStd 00099 00100 } // end namespace MoochoPack 00101 00102 #endif // RSQP_TRACK_SUMMARY_STD_H
1.7.4