////////////////////////////////////////////////////////////////////// // // NewtonMethodOptimizer.cpp: Implementation of the NewtonMethodOptimizer // Optimizer class. // // Written by Matthias Wacker // ////////////////////////////////////////////////////////////////////// #include "optimization/NewtonMethodOptimizer.h" NewtonMethodOptimizer::NewtonMethodOptimizer(OptLogBase *loger) : SuperClass(loger) { } NewtonMethodOptimizer::NewtonMethodOptimizer( const NewtonMethodOptimizer &opt) : SuperClass(opt) { } NewtonMethodOptimizer::~NewtonMethodOptimizer() { } void NewtonMethodOptimizer::init() { SuperClass::init(); } void NewtonMethodOptimizer::updateIterationMatrix() { if(m_costFunction->hasAnalyticHessian() ) { m_IterationMatrix = getAnalyticalHessian(m_parameters); } else { std::cerr << " NewtonMethodOptimizer::updateIterationMatrix() you cannot use this optimizer with the given costfunction" << std::endl; if(m_loger) m_loger->logError("NewtonMethodOptimizer::updateIterationMatrix you cannot use this optimizer with the given costfunction"); assert(false); } }