Commit Graph

11 Commits

Author SHA1 Message Date
Dan Kortschak
815f35ac4b optimize: explicitly state interface satisfaction of types 2020-02-22 06:55:55 +10:30
Brendan Tracey
4b1617dbb0 mat: Add methods for Cholesky to implement Matrix and Symmetric (#928)
* mat: Add methods for Cholesky to implement Matrix and Symmetric

Fixes #919.
2019-03-29 23:07:04 +00:00
Brendan Tracey
c07f678f3f optimize: Change initialization, remove Needser, and update Problem f… (#779)
* optimize: Change initialization, remove Needser, and update Problem function calls

We need a better way to express the Hessian function call so that sparse Hessians can be provided. This change updates the Problem function definitions to allow an arbitrary Symmetric matrix. With this change, we need to change how Location is used, so that we do not allocate a SymDense. Once this location is changed, we no longer need Needser to allocate the appropriate memory, and can shift that to initialization, further simplifying the interfaces.

A 'fake' Problem is passed to Method to continue to make it impossible for the Method to call the functions directly.

Fixes #727, #593.
2019-02-01 15:26:26 +00:00
Dan Kortschak
9d66d7e8f5 mat: rename NewDiagonal to NewDiagDense 2018-12-14 22:45:14 +10:30
Brendan Tracey
7f00e25224 mat: Add Diagonal interface and DiagDense type (#594)
mat: Add Diagonal interface and DiagDense type

Fixes 592.
2018-10-04 21:05:13 +01:00
Brendan Tracey
cebdade430 Remove InitMean from CmaEsChol and use the value passed to Minimize instead 2018-07-26 06:45:43 -06:00
Brendan Tracey
9c5a3cae0e Rename GlobalMethod to Method and GlobalTask to Task 2018-07-26 06:45:43 -06:00
Vladimir Chalupecky
e9e56344e3 all: fix capitalization of Gonum in copyright headers 2018-06-22 17:32:53 +02:00
Dan Kortschak
4eed5b6553 all: replace publicly facing *rand.Rand with rand.Source 2018-05-03 07:40:18 +09:30
Brendan Tracey
996b88e8f8 optimize: completely overhaul Global (#352)
* optimize: completely overhaul Global

The previous implementation of Global was a minefield for incorrectly implementing global optimization methods. It was very difficult to correctly implement methods (both of the provided methods were incorrect), and the resulting code is very ugly. This commit switches to use channels to communicate, allowing a more clear ordering of concurrent code. This also enables better shutdown of methods.

In addition to the main fix of Global, this refactors the two Global methods to use the updated interface, and makes some small improvements that were previously not possible. In addition, there are some small cleanups of Local to better match between the two calls.

If anyone has been curious about what is meant by 'Don't communicate by sharing memory, share memory by communicating' this is it, and why.

* respond to PR comments

* make constants

* simplify termination logic

* optimize: simplify stats collection

* overhaul documentation and respond to PR comments

* implement PR requests

* clean up cmaes
2018-02-05 08:44:02 -07:00
Brendan Tracey
f465caccb0 optimize: Add CMA-ES Cholesky global optimization method (#276)
* optimize: Add CMA-ES Cholesky global optimization method
2017-11-25 21:17:26 -06:00