12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //////////////////////////////////////////////////////////////////////
- //
- // NewtonMethodOptimizer.cpp: Implementation of the NewtonMethodOptimizer
- // Optimizer class.
- //
- // Written by Matthias Wacker
- //
- //////////////////////////////////////////////////////////////////////
- #include "optimization/NewtonMethodOptimizer.h"
- using namespace OPTIMIZATION;
- 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);
- }
- }
|