Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Near-ring/Implementation-of-optimization-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

65 Commits

Repository files navigation

C++ Implementation of optimatzion algorithms

Note:

Implementation requires header only C++ linear algebra library Eigen (https://eigen.tuxfamily.org/) and C++ standard 20+.

Currently Derivative-free method particle swarm optimization (PSO) and Nelder-Mead Method is implemented.

Algorithm will try to find the global minimum of C function f with signature:

double f(double*)

where double* is a C double array / pointer to input vector (f64 array)

the argument int d in the algorithm is the dimension of input vector, the behavior of program is undefined if d is provided with wrong value.

argmin of objective function will be returned as std::vector<double>

====================================================

编译需要C++线性代数库Eigen(https://eigen.tuxfamily.org/) 和C++标准20+。

目前仅简单实现了粒子群优化与Nelder-Mead单纯形算法。

算法将试图找到具有以下签名的C语言函数 f 的全局最小值。

double f(double*)

其中double*是一个C数组/指向 f64 输入向量数组的指针

算法中的参数int d是输入向量的维度。 如果d提供了错误的值,程序的行为将无法定义。

目标函数的argmin将以std::vector<double>的形式返回。

编译粒子群算法需要链接openmp,因只使用了并行for循环,若不需要可直接移除,并设置rand的tid为0即可。

TODO

About

C++ implementation of optimization algorithms particle swarm (PSO) and nelder mead

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /