README.md 1.4 KB
Newer Older
J
Julien Schueller 已提交
1 2
[![Build Status](https://travis-ci.org/stevengj/nlopt.svg?branch=master)](https://travis-ci.org/stevengj/nlopt)

3 4 5 6 7
NLopt is a library for nonlinear local and global optimization, for
functions with and without gradient information.  It is designed as
as simple, unified interface and packaging of several free/open-source
nonlinear optimization libraries.

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

J
Julien Schueller 已提交
11
It is compiled and installed with CMake build system:
12

J
Julien Schueller 已提交
13
    cmake .
J
Julien Schueller 已提交
14
    sudo make install
15

J
Julien Schueller 已提交
16 17
See `CMakeLists.txt` file for cmake options.
To build the latest development sources:
18 19 20

    git clone git://github.com/stevengj/nlopt
    cd nlopt
J
Julien Schueller 已提交
21
    cmake .
22 23
    make

J
Julien Schueller 已提交
24
(To build from git, you will need SWIG.)
25 26 27 28 29 30 31 32

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

The minimization function, `nlopt_minimize`, is described in the [man
page](http://en.wikipedia.org/wiki/Man_page) (`api/nlopt_minimize.3`,
33 34
which is installed by `make install`.  See also the manual on our
web page.
35 36 37 38

There are also interfaces for Fortran, Python, Matlab, Octave, OCaml,
GNU Guile, GNU R, Lua, and Julia.  Interfaces for other languages may
be added in the future.