Skip to content

Implementation of the simplest and at the same time effective optimization method — the Nelder—Mead method

Notifications You must be signed in to change notification settings

neovstan/nelder_mead

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nelder_mead

Implementation of the simplest and at the same time effective optimization method — the Nelder—Mead method

!

#include <cmath>
#include <iostream>
#include <nelder_mead/impl.h>

double himmelblau(double x, double y, double z) {
  return std::pow(std::pow(x, 2) + y - 11, 2) + std::pow(x + std::pow(y, 2) - 7, 2);
}

int main() {
  nelder_mead::impl optimizer;
  const auto min_point = optimizer.run(himmelblau);
  std::cout << min_point.value << std::endl;
  std::cout << min_point.vec.x << " " << min_point.vec.y << " " << min_point.vec.z;
}

About

Implementation of the simplest and at the same time effective optimization method — the Nelder—Mead method

Topics

Resources

Stars

Watchers

Forks