/build/buildd/coinor-ipopt-3.10.1/Ipopt/src/Algorithm/Inexact/IpInexactNormalStepCalc.hpp
Go to the documentation of this file.
00001 // Copyright (C) 2008 International Business Machines and others.
00002 // All Rights Reserved.
00003 // This code is published under the Eclipse Public License.
00004 //
00005 // $Id: IpInexactNormalStepCalc.hpp 1861 2010-12-21 21:34:47Z andreasw $
00006 //
00007 // Authors:  Andreas Waechter            IBM    2008-08-31
00008 
00009 #ifndef __IPINEXACTNORMALSTEPCALC_HPP__
00010 #define __IPINEXACTNORMALSTEPCALC_HPP__
00011 
00012 #include "IpAlgStrategy.hpp"
00013 #include "IpInexactCq.hpp"
00014 
00015 namespace Ipopt
00016 {
00020   class InexactNormalStepCalculator : public AlgorithmStrategyObject
00021   {
00022   public:
00026     InexactNormalStepCalculator()
00027     {}
00028 
00030     virtual ~InexactNormalStepCalculator()
00031     {}
00033 
00035     virtual bool InitializeImpl(const OptionsList& options,
00036                                 const std::string& prefix) = 0;
00037 
00042     virtual bool ComputeNormalStep(SmartPtr<Vector>& normal_x,
00043                                    SmartPtr<Vector>& normal_s) = 0;
00044 
00045   protected:
00047     InexactData& InexData()
00048     {
00049       InexactData& inexact_data =
00050         static_cast<InexactData&>(IpData().AdditionalData());
00051       DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData()));
00052       return inexact_data;
00053     }
00054 
00056     InexactCq& InexCq()
00057     {
00058       InexactCq& inexact_cq =
00059         static_cast<InexactCq&>(IpCq().AdditionalCq());
00060       DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq()));
00061       return inexact_cq;
00062     }
00063 
00064   private:
00074     InexactNormalStepCalculator(const InexactNormalStepCalculator&);
00075 
00077     void operator=(const InexactNormalStepCalculator&);
00079   };
00080 
00081 } // namespace Ipopt
00082 
00083 #endif