Generated on Tue Dec 16 13:34:01 2008 for ell-3.0.0 by doxygen 1.5.1

src/ell/MinimumMapping.cc

Go to the documentation of this file.
00001 
00002 #include "ell/MinimumMapping.hh"
00003 
00004 #include <ell/Walk.hh>
00005 #include <ell/StateCollector.hh>
00006 
00007 namespace ell {
00008 
00009     MM_GradientWalk::MM_GradientWalk()
00010     {
00011     }
00012 
00013     MM_GradientWalk::~MM_GradientWalk()
00014     {
00015     }
00016 
00017     State*
00018     MM_GradientWalk::getLocalMin( const State * const toMap ) const {
00019           // set up state collector that will contain the minimum as the last 
00020           // added state
00021         SC_Counting sc;
00022           // perform the gradient walk
00023         WalkGradient::walkGradient(
00024                         toMap, 
00025                         &sc
00026                         );
00027           // return a clone of the last added State = local minimum
00028         return sc.getLastAdded()->clone();
00029     }
00030 
00031 } // namespace ell
00032