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_STATS_STD_H 00030 #define RSQP_TRACK_STATS_STD_H 00031 00032 #include "MoochoPack_quasi_newton_stats.hpp" 00033 #include "IterationPack_AlgorithmTracker.hpp" 00034 #include "StopWatchPack_stopwatch.hpp" 00035 00036 namespace MoochoPack { 00037 00066 class MoochoTrackerStatsStd 00067 : public IterationPack::AlgorithmTracker 00068 { 00069 public: 00070 00072 MoochoTrackerStatsStd( const ostream_ptr_t& o, const ostream_ptr_t& journal_out ); 00073 00075 /* Set the output stream for statistics outputting. 00076 */ 00077 void set_output_stream(const ostream_ptr_t& o); 00078 00080 const ostream_ptr_t& get_output_stream() const; 00081 00084 00086 void initialize(); 00088 void output_iteration(const Algorithm& algo) const; 00090 void output_final(const Algorithm& algo, EAlgoReturn algo_return) const; 00091 00093 00094 protected: 00095 00096 std::ostream& o() const 00097 { return *o_; } 00098 00099 private: 00100 ostream_ptr_t o_; 00101 mutable int num_QN_updates_; 00102 quasi_newton_stats_iq_member quasi_newton_stats_; 00103 mutable StopWatchPack::stopwatch timer_; 00104 00105 // Not defined and not to be called 00106 MoochoTrackerStatsStd(); 00107 00108 }; // end class MoochoTrackerStatsStd 00109 00110 } // end namespace MoochoPack 00111 00112 #endif // RSQP_TRACK_STATS_STD_H
1.4.7