README.md 1.8 KB
Newer Older
S
Steven G. Johnson 已提交
1
[![Latest Docs](https://readthedocs.org/projects/nlopt/badge/?version=latest)](http://nlopt.readthedocs.io/en/latest/)
J
Julien Schueller 已提交
2
[![Build Status](https://travis-ci.org/stevengj/nlopt.svg?branch=master)](https://travis-ci.org/stevengj/nlopt)
A
Amro 已提交
3
[![Build Status](https://ci.appveyor.com/api/projects/status/github/stevengj/nlopt?branch=master&svg=true)](https://ci.appveyor.com/project/StevenGJohnson/nlopt)
J
Julien Schueller 已提交
4

5 6
NLopt is a library for nonlinear local and global optimization, for
functions with and without gradient information.  It is designed as
A
Amro 已提交
7
a simple, unified interface and packaging of several free/open-source
8 9
nonlinear optimization libraries.

S
tweak  
Steven G. Johnson 已提交
10
The latest release and a complete manual may be found at the NLopt
11 12
home page: http://ab-initio.mit.edu/nlopt

A
Amro 已提交
13 14
NLopt is compiled and installed with the [CMake][1] build system
(see `CMakeLists.txt` file for available options):
15 16 17

    git clone git://github.com/stevengj/nlopt
    cd nlopt
S
Steven G. Johnson 已提交
18 19 20
    mkdir build
    cd build
    cmake ..
21
    make
A
Amro 已提交
22
    sudo make install
23

A
Amro 已提交
24 25
(To build the latest development sources from git, you will need [SWIG][2]
to generate the Python and Guile bindings.)
26 27

Once it is installed, `#include <nlopt.h>` in your C/C++ programs and
A
Amro 已提交
28
link it with `-lnlopt -lm`.  You may need to use a C++ compiler to link
29
in order to include the C++ libraries (which are used internally by NLopt,
A
Amro 已提交
30
even though it exports a C API).
31

A
Amro 已提交
32 33 34
The minimization function, `nlopt_minimize`, is described in the [manpage][3]
(`api/nlopt_minimize.3`, which is installed by `make install`).
See also the manual on our web page.
35

A
Amro 已提交
36
There are also interfaces for Fortran, Python, MATLAB, GNU Octave, OCaml,
37 38
GNU Guile, GNU R, Lua, and Julia.  Interfaces for other languages may
be added in the future.
A
Amro 已提交
39 40 41

[1]: https://cmake.org/
[2]: http://www.swig.org/
S
Sergey Khrykov 已提交
42
[3]: https://en.wikipedia.org/wiki/Man_page