GlobiPack Version of the Day
GlobiPack_GoldenQuadInterpBracket_decl.hpp
00001 /*
00002 // @HEADER
00003 // ***********************************************************************
00004 // 
00005 //    GlobiPack: Collection of Scalar 1D globalizaton utilities
00006 //                 Copyright (2009) Sandia Corporation
00007 // 
00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 // license for use of this work by or on behalf of the U.S. Government.
00010 // 
00011 // This library is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Lesser General Public License as
00013 // published by the Free Software Foundation; either version 2.1 of the
00014 // License, or (at your option) any later version.
00015 // 
00016 // This library is distributed in the hope that it will be useful, but
00017 // WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 // 
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 // USA
00025 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00026 // 
00027 // ***********************************************************************
00028 // @HEADER
00029 */
00030 
00031 #ifndef GLOBIPACK_GOLDEN_BRACKET_QUAD_INTERP_DECL_HPP
00032 #define GLOBIPACK_GOLDEN_BRACKET_QUAD_INTERP_DECL_HPP
00033 
00034 
00035 #include "GlobiPack_MeritFunc1DBase.hpp"
00036 #include "Teuchos_Describable.hpp"
00037 #include "Teuchos_VerboseObject.hpp"
00038 #include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
00039 
00040 
00041 namespace GlobiPack {
00042 
00043 
00049 template<typename Scalar>
00050 class GoldenQuadInterpBracket
00051   : public Teuchos::Describable,
00052     public Teuchos::VerboseObject<GoldenQuadInterpBracket<Scalar> >,
00053     public Teuchos::ParameterListAcceptorDefaultBase
00054 {
00055 public:
00056 
00059 
00061   GoldenQuadInterpBracket();
00062 
00064 
00067 
00069   void setParameterList(RCP<ParameterList> const& paramList);
00071   RCP<const ParameterList> getValidParameters() const;
00072 
00074 
00077 
00120   bool bracketMinimum(
00121     const MeritFunc1DBase<Scalar> &phi,
00122     const Ptr<PointEval1D<Scalar> > &pointLower,
00123     const Ptr<PointEval1D<Scalar> > &pointMiddle,
00124     const Ptr<PointEval1D<Scalar> > &pointUpper,
00125     const Ptr<int> &numIters = Teuchos::null
00126     ) const;
00127 
00129 
00130 private:
00131 
00132   // //////////////////////
00133   // Private data members
00134 
00135 };
00136 
00137 
00142 template<typename Scalar>
00143 inline
00144 const RCP<GoldenQuadInterpBracket<Scalar> > goldenQuadInterpBracket()
00145 {
00146   return Teuchos::rcp(new GoldenQuadInterpBracket<Scalar>());
00147 }
00148 
00149 
00150 // Default values are exposed here for unit testing purposes
00151 
00152 
00153 namespace GoldenQuadInterpBracketUtils {
00154 
00155 
00156 const std::string eta_name = "Armijo Slope Fraction";
00157 const double eta_default = 1.0e-4;
00158 
00159 
00160 } // namespace GoldenQuadInterpBracketUtils
00161 
00162 
00163 
00164 } // namespace GlobiPack
00165 
00166 
00167 #endif // GLOBIPACK_GOLDEN_BRACKET_QUAD_INTERP_DECL_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends