PlayaSteepestDescent.cpp

00001 #include "PlayaSteepestDescent.hpp"
00002 #include "PlayaOut.hpp"
00003 #include "PlayaTabs.hpp"
00004 #include "PlayaLinearCombinationImpl.hpp"
00005 #include "PlayaLineSearchBuilder.hpp"
00006 #include "PlayaOptConvergenceTestBuilder.hpp"
00007 
00008 
00009 namespace Playa
00010 {
00011 using std::endl;
00012 
00013 SteepestDescent::SteepestDescent(
00014   const ParameterList& params
00015   )
00016   : LineSearchBasedOptBase(params)
00017 {}
00018 
00019 
00020 RCP<DirectionGeneratorBase> 
00021 SteepestDescent::makeDirectionGenerator() const 
00022 {
00023   return rcp(new SteepestDescentDirection());
00024 }
00025 
00026 
00027 
00028 bool SteepestDescentDirection::generateDirection(
00029   const RCP<ObjectiveBase>& obj,
00030   const Vector<double>& xCur,
00031   const Vector<double>& gradCur,
00032   const double& fCur,
00033   Vector<double>& p)
00034 {
00035   double hInvScale = obj->getInvHScale();
00036   p = -hInvScale * gradCur;
00037   return true;
00038 }
00039 
00040 
00041 }

doxygen