Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
relf committed Oct 12, 2023
1 parent d8d9c63 commit 840f10b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Remove `fmin_cobyla` implementation as `nlopt_cobyla` now renamed `minimize` based on NLopt implementation is more powerful
Nevertheless Cobyla argmin solver is still based on initial implementation, not on NLopt one.
* Remove gradient from `ObjFn` trait which is now renamed `Func`
* `minimize` API rework to make it more Rusty

## [0.4.0] - 2023-10-06

Expand Down
37 changes: 20 additions & 17 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@


The following licenses apply to the code in this repository:

Copyright (C) 1992, Mike J. D. Powell: COBYLA algorithm in FORTRAN released under the GNU Lesser General Public License.

Copyright (C) 2015-2017, Éric Thiébaut: COBYLA C code released under the MIT "Expat" License (see below).

Copyright (C) 2020-2021, Rémi Lafage: COBYLA Rust wrapper released under the MIT "Expat" License (see below).


The MIT "Expat" License (MIT):

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright (c) 2020-2023 Rémi Lafage

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
[![crates.io](https://img.shields.io/crates/v/cobyla)](https://crates.io/crates/cobyla)
[![docs](https://docs.rs/cobyla/badge.svg)](https://docs.rs/cobyla)

COBYLA is an algorithm for minimizing a function of many variables. The method is derivatives free (only the function values are needed) and take into account constraints on the variables. The algorithm is described in:
COBYLA is an algorithm for minimizing a function of many variables. The method is derivatives-free (only the function values are needed)
and take into account constraints on the variables. The algorithm is described in:

> M.J.D. Powell, "A direct search optimization method that models the objective and constraint functions by linear interpolation," in
> Advances in Optimization and Numerical Analysis Mathematics and Its Applications, vol. 275 (eds. Susana Gomez and Jean-Pierre Hennart),
Expand All @@ -14,8 +15,8 @@ The algorithm comes into two flavours :
* As an [argmin solver](), the Rust code was generated from the C code from [here](https://github.com/emmt/Algorithms/tree/master/cobyla)
* As a function `minimize`, the Rust code was generated from the C code the [NLopt](https://github.com/stevengj/nlopt) project (version 2.7.1)

In both cases, an initial transpilation was done with [c2rust](https://github.com/immunant/c2rust) then the code was manually edited to make it work. Note that the callback mechanism
is inspired from the excellent Rust binding of NLopt, namely [rust-nlopt](https://github.com/adwhit/rust-nlopt)
In both cases, an initial transpilation was done with [c2rust](https://github.com/immunant/c2rust) then the code was manually edited to make it work.
The callback mechanismn is inspired from the Rust binding of NLopt, namely [rust-nlopt](https://github.com/adwhit/rust-nlopt)

## Example

Expand All @@ -27,7 +28,7 @@ cargo run --example paraboloid

* [rust-nlopt](https://github.com/adwhit/rust-nlopt): the Rust binding of the [NLopt project](https://nlopt.readthedocs.io)
* [argmin](https://github.com/argmin-rs/argmin): the pure-Rust optimization framework
* [slsqp](https://github.com/relf/slsqp): As for `cobyla`, a pure Rust implementation of SLSQP transpiled and manually edited from NLopt C code.
* [slsqp](https://github.com/relf/slsqp): a pure Rust implementation of the SLSQP algorithm.

## License

Expand Down

0 comments on commit 840f10b

Please sign in to comment.