summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CITATION8
-rw-r--r--ChangeLog171
-rw-r--r--DESCRIPTION6
-rw-r--r--INDEX8
-rw-r--r--NEWS24
-rw-r--r--debian/changelog28
-rw-r--r--debian/control4
-rw-r--r--debian/copyright4
-rw-r--r--debian/octave-stk.lintian-overrides11
-rw-r--r--debian/source/lintian-overrides6
-rw-r--r--debian/upstream/metadata6
-rw-r--r--debian/watch2
-rw-r--r--doc/README.md52
-rw-r--r--inst/examples/test_functions/stk_testcase_truss3.m61
-rw-r--r--inst/examples/test_functions/stk_testfun_braninhoo.m14
-rw-r--r--inst/examples/test_functions/stk_testfun_goldsteinprice.m2
-rw-r--r--inst/examples/test_functions/stk_testfun_hartman3.m115
-rw-r--r--inst/examples/test_functions/stk_testfun_hartman4.m123
-rw-r--r--inst/examples/test_functions/stk_testfun_hartman6.m122
-rw-r--r--inst/examples/test_functions/stk_testfun_hartman_generic.m103
-rw-r--r--inst/examples/test_functions/stk_testfun_truss3_bb.m19
-rw-r--r--inst/examples/test_functions/stk_testfun_truss3_vol.m20
-rw-r--r--inst/examples/test_functions/stk_testfun_twobumps.m25
-rw-r--r--inst/misc/benchmarks/stk_benchmark_uppertriangular.m6
-rw-r--r--inst/misc/dist/stk_filldist_exact.m2
-rw-r--r--inst/misc/distrib/stk_distrib_bivnorm_cdf.m8
-rw-r--r--inst/misc/optim/@stk_optim_octavesqp/private/sqp_quadprog.m1
-rw-r--r--inst/misc/parallel/@stk_parallel_engine_parfor/stk_parallel_engine_parfor.m2
-rw-r--r--inst/misc/test/stk_is_lhs.m12
-rw-r--r--inst/misc/test/stk_isequal_tolabs.m16
-rw-r--r--inst/misc/test/stk_isequal_tolrel.m14
-rw-r--r--inst/misc/test/stk_test.m6
-rw-r--r--inst/sampling/@stk_sampcrit_ei/set.m1
-rw-r--r--inst/sampling/stk_sampling_nestedlhs.m2
-rw-r--r--inst/stk_version.m4
35 files changed, 864 insertions, 144 deletions
diff --git a/CITATION b/CITATION
index b7f7ff5..0be79cc 100644
--- a/CITATION
+++ b/CITATION
@@ -2,8 +2,8 @@
To cite this release of STK in publications use:
- Julien Bect, Emmanuel Vazquez and others (2022).
- STK: a Small (Matlab/Octave) Toolbox for Kriging. Release 2.7.
+ Julien Bect, Emmanuel Vazquez and others (2023).
+ STK: a Small (Matlab/Octave) Toolbox for Kriging. Release 2.8.
URL https://github.com/stk-kriging/stk/
A BibTeX entry for LaTeX users is:
@@ -11,8 +11,8 @@ A BibTeX entry for LaTeX users is:
@misc{,
author = {Bect, Julien and Vazquez, Emmanuel and others},
title = {{STK}: a {S}mall ({M}atlab/{O}ctave) {T}oolbox
- for {K}riging. {R}elease 2.7},
- year = {2022},
+ for {K}riging. {R}elease 2.8},
+ year = {2023},
url = {https://github.com/stk-kriging/stk/}
}
diff --git a/ChangeLog b/ChangeLog
index d691ae9..c7926c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,172 @@
+2023-01-06 Julien Bect <julien.bect@centralesupelec.fr>
+
+ Remove old 'dev' documentation from the released tarballs
+
+ * doc/dev/model.texi: Delete.
+ * admin/build_tools/build_octpkg.m: Do not create empty directory.
+
+ Simplify build process
+
+ * Makefile: Remove the distinction between the github release and
+ the Octave Forge release. There is only one release now, the
+ github one (still with two tarballs).
+ * admin/build_tools/build_allpurpose.m: Update paths.
+ * admin/build_tools/build_octpkg.m: Idem.
+ * .github/workflows/run-tests.yml: Idem.
+
+ Raise minimal (tested) Matlab version number to R2014a
+
+ * README.md: Raise minimal (tested) Matlab version number to R2014a.
+ * NEWS.md: Advertise the change.
+
+2023-01-04 Julien Bect <julien.bect@centralesupelec.fr>
+
+ Raise required Octave version number to 4.0.1
+
+ * README.md: Raise required Octave version number to 4.0.1.
+ * admin/build_tools/build_octpkg.m: Idem.
+ * admin/CODING_GUIDELINES: Update.
+ * NEWS.md: Advertise the change.
+
+ Update quilt patches
+
+ * admin/octpkg/patches/matlab-graphics-axis-Axes.patch: Update patch.
+ * admin/octpkg/patches/prevent-PKG_ADD-loop.patch: Idem.
+ * admin/octpkg/patches/prevent-PKG_DEL-loop.patch: Idem.
+ * admin/octpkg/patches/remove-buildmex.patch: Idem.
+ * admin/octpkg/patches/remove-testprivatemex.patch: Idem.
+ * admin/octpkg/patches/stk-init-mole-delete.patch: Idem.
+ * admin/octpkg/patches/stk-init-rmpath-cleanup.patch: Idem.
+ * admin/octpkg/patches/workaround-octave-bug-46350.patch: Idem.
+
+2022-12-19 Julien Bect <julien.bect@centralesupelec.fr>
+
+ Makefile: Add quote around strings in Octave calls
+
+ * Makefile: Add quote around strings in Octave calls
+
+2022-12-16 Julien Bect <julien.bect@centralesupelec.fr>
+
+ More Hartman functions
+
+ * examples/test_functions/stk_testfun_hartman_generic.m: Generic
+ implementation of Hartman functions (Dixon-Szego diagonal form).
+ * examples/test_functions/stk_testfun_hartman3.m: New function.
+ * examples/test_functions/stk_testfun_hartman4.m: Rewrite using generic.
+ * examples/test_functions/stk_testfun_hartman6.m: Rewrite using generic.
+ * admin/octpkg/INDEX: Update Octave package index.
+
+ CC0 licence for some existing test functions
+
+ * examples/test_functions/stk_testfun_braninhoo.m: Apply CC0.
+ * examples/test_functions/stk_testfun_twobumps.m: Reformat existing header.
+ * examples/test_functions/stk_testcase_truss3.m: Idem.
+ * examples/test_functions/stk_testfun_truss3_bb.m: Idem.
+ * examples/test_functions/stk_testfun_truss3_vol.m: Idem.
+
+ stk_testcase_truss3.m: Polish help text
+
+ * examples/test_functions/stk_testcase_truss3.m: Polish help text.
+
+2022-12-13 Julien Bect <julien.bect@centralesupelec.fr>
+
+ .github/workflows: Use Matlab R2022b as well
+
+ * .github/workflows/run-linter.yml: Use Matlab R2022b as well.
+ * .github/workflows/run-tests.yml: Idem.
+
+2022-08-23 Julien Bect <julien.bect@centralesupelec.fr>
+
+ CONTRIBUTING.md: Requirements for an acceptable contribution
+
+ * .github/CONTRIBUTING.md: Explain (some of) the requirements for
+ an acceptable contribution.
+
+2022-08-10 Julien Bect <julien.bect@centralesupelec.fr>
+
+ Fix more linter warnings
+
+ * admin/stk_mlint_all.m: Add 'NASGU', NBRAK2', 'NCOMMA', 'SPERR', and
+ 'UNRCH' to the list of critical errors.
+ * .github/workflows/run-linter.yml: Use R2022a as well.
+ * admin/build_tools/build_allpurpose_htmldoc.m: Fix warnings.
+ * admin/build_tools/generate_htmldoc.m: Idem.
+ * admin/build_tools/get_allpurpose_html_options.m: Idem.
+ * iago/crit/private/view_init_2d.m: Idem.
+ * iago/crit/private/view_samplingcrit_2d.m: Idem.
+ * iago/crit/stk_optim_crit_EI.m: Idem.
+ * iago/crit/stk_optim_crit_SUR.m: Idem.
+ * iago/crit/stk_optim_crit_iago.m: Idem.
+ * iago/rep/stk_fakenorep.m: Idem.
+ * iago/stk_optimscript.m: Idem.
+ * iago/utils/stk_quadrature.m: Idem.
+ * misc/benchmarks/stk_benchmark_uppertriangular.m: Idem.
+ * misc/dist/stk_filldist_exact.m: Idem.
+ * misc/distrib/stk_distrib_bivnorm_cdf.m: Idem.
+ * misc/optim/@stk_optim_octavesqp/private/sqp_quadprog.m: Idem.
+ * misc/test/stk_is_lhs.m: Idem.
+ * misc/test/stk_test.m: Idem.
+ * sampling/@stk_sampcrit_ei/set.m: Idem.
+
+2022-08-08 Julien Bect <julien.bect@centralesupelec.fr>
+
+ .github/workflows: Update actions
+
+ * .github/workflows/run-linter.yml: Update actions.
+ * .github/workflows/run-tests.yml: Idem.
+
+2022-03-20 Julien Bect <julien.bect@centralesupelec.fr>
+
+ Provide unscaled Hartman4 function
+
+ * examples/test_functions/stk_testfun_hartman4s.m: Rename from...
+ * examples/test_functions/stk_testfun_hartman4.m: ...Rename to. Remove
+ output scaling, adapt help text & unit tests.
+ * admin/octpkg/INDEX: Update Octave package index.
+
+2022-03-10 Julien Bect <julien.bect@centralesupelec.fr>
+
+ stk_testfun_hartman6.m: Hartman6 test function
+
+ * examples/test_functions/stk_testfun_hartman6.m: New test
+ function ("Hartman6") from the Dixon & Szego (1978) benchmark.
+ * admin/octpkg/INDEX: Update Octave package index.
+
+2022-03-07 Julien Bect <julien.bect@centralesupelec.fr>
+
+ Contributing guidelines
+
+ * .github/CONTRIBUTING.md: Explain the contribution process.
+ * README.md: Link to CONTRIBUTING.md on GitHub.
+
+2022-03-04 Julien Bect <julien.bect@centralesupelec.fr>
+
+ Fix more linter warnings
+
+ * admin/stk_mlint_all.m: Display critical errors separately. Add
+ 'EXIST' and 'NOSEL' to the list of critical errors.
+ * misc/parallel/@stk_parallel_engine_parfor/stk_parallel_engine_parfor.m:
+ Fix warnings.
+ * misc/test/stk_isequal_tolabs.m: Idem.
+ * misc/test/stk_isequal_tolrel.m: Idem.
+ * misc/test/stk_test.m: Idem.
+ * sampling/stk_sampling_nestedlhs.m: Idem.
+
+2022-03-03 Julien Bect <julien.bect@centralesupelec.fr>
+
+ stk_testfun_hartman4s.m: Scaled Hartman4 test function
+
+ * examples/test_functions/stk_testfun_hartman4s.m: New test
+ function ("scaled Hartman4") from Picheny et al (2013).
+ * admin/octpkg/INDEX: Update Octave package index.
+
+2022-02-27 Julien Bect <julien.bect@centralesupelec.fr>
+
+ README.md: Prefer triple backquotes
+
+ * README.md: Prefer triple backquotes to emphasize commands
+ to be typed.
+
2022-02-23 Julien Bect <julien.bect@centralesupelec.fr>
stk_init.m: Update the list of functions that contain persistents
@@ -114,7 +283,7 @@
Raise required Octave version number to 4.0.0
* README.md: Raise required Octave version number to 4.0.0.
- * admin/build_tools/build_octpkg.m: Iem.
+ * admin/build_tools/build_octpkg.m: Idem.
* admin/CODING_GUIDELINES: Update.
* arrays/@stk_hrect/stk_hrect.m: Refer to CG#08.
* misc/test/stk_runtests.m: Remove reference to 3.8.2.
diff --git a/DESCRIPTION b/DESCRIPTION
index 27a516a..d8a67c6 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
Name: STK
#
-Version: 2.7.0
+Version: 2.8.0
#
-Date: 2022-02-23
+Date: 2023-01-06
#
Title: STK: A Small Toolbox for Kriging
#
@@ -25,6 +25,6 @@ License: GPLv3+
#
Url: https://github.com/stk-kriging/stk/
#
-Depends: octave (>= 4.0.0)
+Depends: octave (>= 4.0.1)
#
Autoload: no
diff --git a/INDEX b/INDEX
index c6cc3c4..06f0369 100644
--- a/INDEX
+++ b/INDEX
@@ -2,7 +2,7 @@ stk >> STK, a Small Toolbox for Kriging
## Copyright Notice
##
-## Copyright (C) 2015-2021 CentraleSupelec
+## Copyright (C) 2015-2023 CentraleSupelec
## Copyright (C) 2014 SUPELEC
##
## Author: Julien Bect <julien.bect@centralesupelec.fr>
@@ -34,7 +34,7 @@ stk >> STK, a Small Toolbox for Kriging
## versions of STK, no need to adertise them.
##
## 2) Internal: these functions are mostly intended for internal
-## use in STK. Although it might be occasionnaly useful for
+## use in STK. Although it might be occasionally useful for
## advanced users to call them directly, they are not considered
## as part of the public API and therefore not as stable as
## public API functions. Use at your own risk.
@@ -302,6 +302,10 @@ Examples: test functions, datasets, etc.
stk_testfun_borehole
stk_testfun_braninhoo
stk_testfun_goldsteinprice
+ stk_testfun_hartman3
+ stk_testfun_hartman4
+ stk_testfun_hartman6
+ stk_testfun_hartman_generic
stk_testfun_twobumps
stk_testcase_truss3
stk_testfun_truss3_bb
diff --git a/NEWS b/NEWS
index f19ce44..da290ff 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,27 @@
+# Changes in version 2.8.0
+
+## Required Matlab/Octave version
+
+* Minimal (tested) Matlab version number has been raised to R2014a.
+
+* Required Octave version number has been raised to 4.0.1.
+ (There are known problems with 4.0.0.)
+
+## Test functions
+
+* `stk_testfun_hartman3.m`, `stk_testfun_hartman6.m`: New test
+ functions ("Hartman3" and "Hartman6") from the Dixon & Szego (1978)
+ benchmark.
+
+* `stk_testfun_hartman4.m`: New test function ("Hartman4") based on
+ Picheny et al (2013), with a different scaling.
+
+* Most test functions in `examples/test_functions` are now also
+ available under the CC0 license (see each file).
+
+-----
+
+
# Changes in version 2.7.0
## Required Matlab/Octave version
diff --git a/debian/changelog b/debian/changelog
index 53c92e6..3fc7da7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,31 @@
+octave-stk (2.8.0-2) unstable; urgency=medium
+
+ * Team upload
+ * Upload to unstable
+
+ * d/u/metadata:
+ + Update Bug-{Database,Submit} URLs
+ + Add Changelog and Documentation URLs
+
+ -- Rafael Laboissière <rafael@debian.org> Tue, 13 Jun 2023 09:51:36 -0300
+
+octave-stk (2.8.0-1) experimental; urgency=medium
+
+ * Team upload
+
+ * New upstream version 2.8.0
+ * d/watch: Update tarball link
+ * d/control:
+ + Update Homepage
+ + Bump Standards-Version to 4.6.2 (no changes needed)
+ * d/copyright: Reflect upstream changes
+ * d/octave-stk.lintian-overrides:
+ + Update for new syntax (file names inside square brackets)
+ + Override Lintian error library-not-linked-against-libc
+ * d/s/lintian-overrides: Drop obsolete file
+
+ -- Rafael Laboissière <rafael@debian.org> Sun, 19 Mar 2023 11:53:21 -0300
+
octave-stk (2.7.0-3) unstable; urgency=medium
* Team upload
diff --git a/debian/control b/debian/control
index 764c0d3..bdfc90e 100644
--- a/debian/control
+++ b/debian/control
@@ -5,8 +5,8 @@ Maintainer: Debian Octave Group <team+pkg-octave-team@tracker.debian.org>
Uploaders: Julien Bect <julien.bect@centralesupelec.fr>,
Build-Depends: debhelper-compat (= 13),
dh-sequence-octave
-Standards-Version: 4.6.1
-Homepage: https://octave.sourceforge.io/stk/
+Standards-Version: 4.6.2
+Homepage: https://gnu-octave.github.io/packages/stk/
Vcs-Git: https://salsa.debian.org/pkg-octave-team/octave-stk.git
Vcs-Browser: https://salsa.debian.org/pkg-octave-team/octave-stk
Testsuite: autopkgtest-pkg-octave
diff --git a/debian/copyright b/debian/copyright
index 6961494..1809264 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -4,7 +4,7 @@ Upstream-Contact: The Octave Community <octave-maintainers@octave.org>
Source: https://octave.sourceforge.io/stk/
Files: *
-Copyright: 2015-2017, 2019-2022 CentraleSupelec
+Copyright: 2015-2017, 2019-2023 CentraleSupelec
2011-2014, SUPELEC
2014, Ashwin Ravisankar
2013, Guillaume Carlier
@@ -27,7 +27,7 @@ License: GPL-3+
Files: debian/*
Copyright: 2015-2018 Julien Bect <julien.bect@centralesupelec.fr>
2017 Sébastien Villemot <sebastien@debian.org>
- 2016-2020, 2022 Rafael Laboissière <rafael@debian.org>
+ 2016-2020, 2022, 2023 Rafael Laboissière <rafael@debian.org>
License: GPL-3+
License: GPL-3+
diff --git a/debian/octave-stk.lintian-overrides b/debian/octave-stk.lintian-overrides
index 8069aef..e38ecbe 100644
--- a/debian/octave-stk.lintian-overrides
+++ b/debian/octave-stk.lintian-overrides
@@ -1,8 +1,13 @@
-# The *.mex produced by the octave-stk package behave as plugin
+# The *.mex files produced by the octave-stk package behave as plugin
# modules which are loaded at running time by Octave. There is no
# need to provide dependency information for them.
-octave-stk: shared-library-lacks-prerequisites usr/lib/*
+octave-stk: shared-library-lacks-prerequisites [usr/lib/*]
+
+# The *.mex files produced by the octave-stk package behave as plugin
+# modules which are loaded at running time by Octave. They are not
+# intended to be used as shared libraries.
+octave-stk: library-not-linked-against-libc [usr/lib/*]
# This is a false positive. The file
# usr/share/doc/octave-stk/changelog.gz is not the Debian changelog.
-octave-stk: debian-changelog-file-is-a-symlink usr/share/doc/octave-stk/changelog.gz
+octave-stk: debian-changelog-file-is-a-symlink [usr/share/doc/octave-stk/changelog.gz]
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
deleted file mode 100644
index f8d9689..0000000
--- a/debian/source/lintian-overrides
+++ /dev/null
@@ -1,6 +0,0 @@
-# The new official web site for the Octave-Forge packages is now
-# hosted at gnu-octave.github.io, even though the tarballs are
-# still distributed at SourceForge. In debian/watch, it is necessary
-# to explicitly indicate the links at downloads.sourceforge.net. This
-# is triggering a Lintian warning, but it is a false positive.
-octave-stk source: debian-watch-lacks-sourceforge-redirector https://gnu-octave.github.io/packages/stk/ https://downloads.sourceforge.net/project/octave/Octave%20Forge%20Packages/Individual%20Package%20Releases/stk-(.+).tar.gz [debian/watch:3]
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
index e00a6ff..225206d 100644
--- a/debian/upstream/metadata
+++ b/debian/upstream/metadata
@@ -5,7 +5,9 @@ Reference:
Year: 2019
Type: misc
URL: http://kriging.sourceforge.net
-Bug-Database: https://savannah.gnu.org/bugs/?group=octave
-Bug-Submit: https://savannah.gnu.org/bugs/?func=additem&group=octave
+Bug-Database: https://github.com/stk-kriging/stk/issues
+Bug-Submit: https://github.com/stk-kriging/stk/issues/new
Repository: https://github.com/stk-kriging/stk.git
Repository-Browse: https://octave.sourceforge.io/pkg-repository/stk/
+Changelog: https://github.com/stk-kriging/stk/blob/master/NEWS.md
+Documentation: https://stk-kriging.github.io/release/latest/doc/html/
diff --git a/debian/watch b/debian/watch
index 2f5dbad..2fa0cc2 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
version=4
https://gnu-octave.github.io/packages/stk/ \
- https://downloads.sourceforge.net/project/octave/Octave%20Forge%20Packages/Individual%20Package%20Releases/stk-(.+).tar.gz
+ https://github.com/stk-kriging/stk/releases/download/(.+)/stk-.*-octpkg.tar.gz
diff --git a/doc/README.md b/doc/README.md
index 8fb364f..e8089a3 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -26,9 +26,9 @@ along with STK. If not, see <http://www.gnu.org/licenses/>.
## General information
- Version: 2.7.0 (2022-02-23)
+ Version: 2.8.0 (2023-01-06)
- Authors: See AUTHORS.md file
+ Authors: See [AUTHORS](./AUTHORS.md) file
Maintainers: Julien Bect <julien.bect@centralesupelec.fr>
and Emmanuel Vazquez <emmanuel.vazquez@centralesupelec.fr>
@@ -47,7 +47,7 @@ along with STK. If not, see <http://www.gnu.org/licenses/>.
Non-parametric Regression, etc.).
Copyright: Large portions are Copyright (C) 2011-2014 SUPELEC
- and Copyright (C) 2015-2022 CentraleSupelec.
+ and Copyright (C) 2015-2023 CentraleSupelec.
See individual copyright notices for more details.
License: GNU General Public License, version 3 (GPLv3).
@@ -96,8 +96,11 @@ After that, you should be able to run the examples located in the `examples`
directory. All of them are scripts, the file name of which starts with
the `stk_example_` prefix.
-For instance, type `stk_example_kb03` to run the third example in the "Kriging
-basics" series.
+For instance, type
+```
+stk_example_kb03
+```
+to run the third example in the "kriging basics" series.
Remark: when using STK with Mathworks' Parallel Computing Toolbox, it is
important to run `stk_init` within each worker. This can be achieved using:
@@ -105,10 +108,12 @@ important to run `stk_init` within each worker. This can be achieved using:
pctRunOnAll run /path/to/stk/stk_init.m
```
-
### Quick start with the Octave package release (Octave only)
-Assuming that you have a working Internet connection, typing `pkg install -forge stk`
+Assuming that you have a working Internet connection, typing
+```
+pkg install -forge stk
+```
(from within Octave) will automatically download the latest STK package tarball from the
[Octave Forge](http://octave.sourceforge.net/)
[file release system](https://sourceforge.net/projects/octave/files/)
@@ -116,12 +121,21 @@ on SourceForge and install it for you.
Alternatively, if you want to install an older (or beta) release, you can download
the tarball from either the STK project FRS or the Octave Forge FRS, and install it
-with `pkg install FILENAME.tar.gz`.
+with
+```
+pkg install FILENAME.tar.gz
+```
-After that, you can load STK using `pkg load stk`.
+After that, you can load STK using
+```
+pkg load stk
+```
-To check that STK is properly loaded, try for instance `stk_example_kb03` to run
-the third example in the "Kriging basics" series.
+To check that STK is properly loaded, try for instance
+```
+stk_example_kb03
+```
+to run the third example in the "kriging basics" series.
## Requirements and recommendations
@@ -132,14 +146,13 @@ the third example in the "Kriging basics" series.
### Requirements and recommendations for use with GNU Octave
- The STK is tested to work with
- [GNU Octave 4.0.0 or newer](https://wiki.octave.org/Release_History).
-
+ The STK is tested to work with
+ [GNU Octave 4.0.1 or newer](https://wiki.octave.org/Release_History).
### Requirements and recommendations for use with Matlab
The STK is tested to work with
- [Matlab R2009b or newer](https://en.wikipedia.org/wiki/MATLAB#Release_history).
+ [Matlab R2014a or newer](https://en.wikipedia.org/wiki/MATLAB#Release_history).
The Optimization Toolbox is recommended.
@@ -200,5 +213,12 @@ DOI: 10.1007/s11222-011-9241-4.
to report bugs or ask for new features (do not hesitate to do so!).
If you use STK in Octave, you can also have a look there:
-
+
<https://octave.sourceforge.io/support-help.php>
+
+
+## How to contribute
+
+ The contribution process is explained in
+ [CONTRIBUTING.md](https://github.com/stk-kriging/stk/blob/master/.github/CONTRIBUTING.md).
+
diff --git a/inst/examples/test_functions/stk_testcase_truss3.m b/inst/examples/test_functions/stk_testcase_truss3.m
index 2f22f31..45754a3 100644
--- a/inst/examples/test_functions/stk_testcase_truss3.m
+++ b/inst/examples/test_functions/stk_testcase_truss3.m
@@ -7,8 +7,8 @@
%
% * .constants: all the numerical constants for this problem,
%
-% * .search_domain: an stk_hrect object that specifies the search domain
-% of the optimization problem.
+% * .search_domain: an stk_hrect object that specifies the search
+% domain of the optimization problem.
%
% TEST CASE OVERVIEW
%
@@ -23,16 +23,18 @@
% (1) \_ | __/ (3) |
% \_P_/ v
%
-% Nodes A, B and C are fixed (pin joints). Node P is submitted to both an
-% horizontal load F1 (e.g., wind) and a vertical load F2 (suspended load).
+% Nodes A, B and C are fixed (pin joints). Node P is submitted to both
+% an horizontal load F1 (e.g., wind) and a vertical load F2 (suspended
+% load).
%
% The design variables are the cross-sections a1, a2 and a3 of the three
-% bars, and the horizontal position w of the vertical bar. The quantities
-% of interest are the total volume of the structure, the mechanical
-% (tensile) stress in the bars, and the displacement of P. Various
-% formulations of optimization problems can be considered, depending on
-% which quantities are selected as contraints and objectives, and whether
-% or not uncertainties are taken into account (robust formulations).
+% bars, and the horizontal position w of the vertical bar. The
+% quantities of interest are the total volume of the structure, the
+% mechanical (tensile) stress in the bars, and the displacement of P.
+% Various formulations of optimization problems can be considered,
+% depending on which quantities are selected as contraints and
+% objectives, and whether or not uncertainties are taken into account
+% (robust formulations).
%
% NUMERICAL CONSTANTS
%
@@ -53,18 +55,18 @@
% * .F2_mean: mean (nominal) value of the vertical load [N]
% * .F2_std: standard deviation of the vertical load [N].
%
-% The standard deviations .F1_std and .F2_std are used in the formulation
-% of robust optimization problems related to this test case [see 1, chap 11].
+% The standard deviations F1_std and F2_std are used in the formulation
+% of robust optimization problems [see 1, chap 11].
%
% NUMERICAL FUNCTIONS
%
-% Two numerical functions are provided to compute the quantities of interest
-% of this test case:
+% Two numerical functions are provided to compute the quantities of
+% interest of this test case:
%
% * stk_testfun_truss3_vol: computes the total volume of the structure,
%
-% * stk_testfun_truss3_bb: computes the tensile stress in the bars and the
-% displacement of P.
+% * stk_testfun_truss3_bb: computes the tensile stress in the bars and
+% the displacement of P.
%
% Both functions have the same syntax:
%
@@ -72,11 +74,12 @@
%
% Z = stk_testfun_truss3_bb (X, CONST)
%
-% where CONST is a structure containing the necessary numerical constants.
-% To use the constants from [1], pass TC.constants as second input argument.
+% where CONST is a structure containing the necessary numerical
+% constants. To use the constants from [1], pass TC.constants as
+% second input argument.
%
-% Both function accept as first input argument an N x D matrix (or data
-% frame) where D is either 4 or 6:
+% Both functions accept as first input argument an N x D matrix
+% (or data frame) where D is either 4 or 6:
%
% * columns 1--3: cross-section a1, a2 and a3,
%
@@ -84,9 +87,9 @@
%
% * column 5-6 (optional): horizontal and vertical loads F1, F2.
%
-% The second function is named 'bb' for 'black box', as it plays the role of
-% a (supposedly expensive to evaluate) black box computer model for this
-% test case. The output Z has five columns, corresponding to:
+% The second function is named 'bb' for 'black box', as it plays the
+% role of a (supposedly expensive to evaluate) black box computer model
+% for this test case. The output Z has five columns, corresponding to:
%
% * columns 1--2: horizontal and vertical displacement y1, y2 of P,
%
@@ -125,6 +128,18 @@
%
% See also: stk_testfun_truss3_vol, stk_testfun_truss3_bb
+% Author
+%
+% Julien Bect <julien.bect@centralesupelec.fr>
+
+% Copying Permission Statement (this file)
+%
+% To the extent possible under law, CentraleSupelec has waived all
+% copyright and related or neighboring rights to
+% stk_testcase_truss3.m. This work is published from France.
+%
+% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
+
% Copyright Notice
%
% This file: stk_testcase_truss3.m was written in 2017
diff --git a/inst/examples/test_functions/stk_testfun_braninhoo.m b/inst/examples/test_functions/stk_testfun_braninhoo.m
index b12fecc..c3b5b30 100644
--- a/inst/examples/test_functions/stk_testfun_braninhoo.m
+++ b/inst/examples/test_functions/stk_testfun_braninhoo.m
@@ -15,13 +15,19 @@
% [2] Dixon L.C.W., Szego G.P., Towards Global Optimization 2, North-
% Holland, Amsterdam, The Netherlands (1978)
-% Copyright Notice
+% Author
%
-% Copyright (C) 2012-2014 SUPELEC
+% Julien Bect <julien.bect@centralesupelec.fr>
+
+% Copying Permission Statement (this file)
+%
+% To the extent possible under law, CentraleSupelec has waived all
+% copyright and related or neighboring rights to
+% stk_testfun_braninhoo.m. This work is published from France.
%
-% Author: Julien Bect <julien.bect@centralesupelec.fr>
+% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
-% Copying Permission Statement
+% Copying Permission Statement (STK toolbox as a whole)
%
% This file is part of
%
diff --git a/inst/examples/test_functions/stk_testfun_goldsteinprice.m b/inst/examples/test_functions/stk_testfun_goldsteinprice.m
index cc286ed..6e2beff 100644
--- a/inst/examples/test_functions/stk_testfun_goldsteinprice.m
+++ b/inst/examples/test_functions/stk_testfun_goldsteinprice.m
@@ -49,7 +49,7 @@
function y = stk_testfun_goldsteinprice (x)
-if nargin == 0,
+if nargin == 0
visu_goldsteinprice ();
return;
end
diff --git a/inst/examples/test_functions/stk_testfun_hartman3.m b/inst/examples/test_functions/stk_testfun_hartman3.m
new file mode 100644
index 0000000..cc3bdee
--- /dev/null
+++ b/inst/examples/test_functions/stk_testfun_hartman3.m
@@ -0,0 +1,115 @@
+% STK_TESTFUN_HARTMAN3 computes the "Hartman3" function
+%
+% The Hartman3 function is a test function in dimension 3, which is
+% part of the famous Dixon & Szego benchmark [1] in global optimization.
+%
+% It is usually minimized over [0, 1]^3.
+%
+% HISTORICAL REMARKS
+%
+% This function belongs to a general class of test functions
+% introduced by Hartman [2], hence the name.
+%
+% The particular set of coefficients used in the definition of the
+% "Hartman3" function, however, seems to have been introduced by [1].
+%
+% GLOBAL MINIMUM
+%
+% According to [5], the function has one global minimum at
+%
+% x = [0.1, 0.55592003, 0.85218259].
+%
+% The corresponding function value is:
+%
+% f(x) = -3.862634748621772.
+%
+% A slightly lower value is attained [4] at
+%
+% x = [0.114614 0.554649 0.852547].
+%
+% The corresponding function value is:
+%
+% f(x) = -3.862747199255087
+%
+% The exact global optimum does not appear to be known.
+%
+% REFERENCES
+%
+% [1] L. C. W. Dixon & G. P. Szego (1978). Towards Global
+% Optimization 2, North-Holland, Amsterdam, The Netherlands
+%
+% [2] J. K. Hartman (1973). Some experiments in global optimization.
+% Naval Research Logistics Quarterly, 20(3):569-576.
+%
+% [3] V. Picheny, T. Wagner & D. Ginsbourger (2013). A benchmark
+% of kriging-based infill criteria for noisy optimization.
+% Structural and Multidisciplinary Optimization, 48:607-626.
+%
+% [4] S. Surjanovic & D. Bingham. Virtual Library of Simulation
+% Experiments: Test Functions and Datasets. Retrieved March 3,
+% 2022, https://www.sfu.ca/~ssurjano/hart4.html.
+%
+% [5] O. Roustant, D. Ginsbourger & Y. Deville (2012).
+% DiceKriging package, version 1.6.0 from 2021-02-23
+% URL: https://cran.r-project.org/web/packages/DiceKriging/index.html
+
+% Author
+%
+% Julien Bect <julien.bect@centralesupelec.fr>
+
+% Copying Permission Statement (this file)
+%
+% To the extent possible under law, CentraleSupelec has waived all
+% copyright and related or neighboring rights to
+% stk_testfun_hartman3.m. This work is published from France.
+%
+% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
+
+% Copying Permission Statement (STK toolbox as a whole)
+%
+% This file is part of
+%
+% STK: a Small (Matlab/Octave) Toolbox for Kriging
+% (https://github.com/stk-kriging/stk/)
+%
+% STK is free software: you can redistribute it and/or modify it under
+% the terms of the GNU General Public License as published by the Free
+% Software Foundation, either version 3 of the License, or (at your
+% option) any later version.
+%
+% STK is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+% License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with STK. If not, see <http://www.gnu.org/licenses/>.
+
+function y = stk_testfun_hartman3 (x)
+
+a = [ ...
+ [ 3.0 0.1 3.0 0.1]; ...
+ [ 10.0 10.0 10.0 10.0]; ...
+ [ 30.0 35.0 30.0 35.0]];
+
+p = [ ...
+ [ 0.3689 0.4699 0.1091 0.03815]; ...
+ [ 0.1170 0.4387 0.8732 0.57430]; ...
+ [ 0.2673 0.7470 0.5547 0.88280]];
+
+c = [1.0 1.2 3.0 3.2];
+
+y = stk_testfun_hartman_generic (x, a, p, c);
+
+end % function
+
+
+%!test
+%! x1 = [0.1, 0.55592003, 0.85218259];
+%! y1 = -3.862634748621772;
+%!
+%! x2 = [0.114614 0.554649 0.852547];
+%! y2 = -3.862747199255087;
+%!
+%! y = stk_testfun_hartman3 ([x1; x2]);
+%! assert (stk_isequal_tolabs (y, [y1; y2], 1e-15))
diff --git a/inst/examples/test_functions/stk_testfun_hartman4.m b/inst/examples/test_functions/stk_testfun_hartman4.m
new file mode 100644
index 0000000..620332d
--- /dev/null
+++ b/inst/examples/test_functions/stk_testfun_hartman4.m
@@ -0,0 +1,123 @@
+% STK_TESTFUN_HARTMAN4 computes the "Hartman4" function
+%
+% CALL: Y = stk_testfun_hartman4 (X)
+%
+% computes the value Y of the Hartman4 function at X.
+%
+% The Hartman4 function is a test function in dimension 4,
+% which is usually minimized over [0, 1]^4.
+%
+% HISTORICAL REMARKS
+%
+% This function belongs to a general class of test functions introduced
+% by Hartman [1]. The particular set of coefficients used in the
+% Hartman4 function seems to have been introduced by [2].
+%
+% Note that the test function used in [2] is a scaled version of the
+% one implemented here, which can be recovered as follows:
+%
+% y = (1.1 + stk_testfun_hartman4 (x)) / 0.839;
+%
+% Picheny & co-authors [2] refer to Dixon & Szego [3] for this test
+% function, but it turns out that [3] only contains two sorts of
+% "Hartman functions", in dimensions three and six.
+%
+% In fact, this function appears to have been obtained by truncating
+% the sum at the fourth coordinate in the six-dimensional Hartman
+% function of [3].
+%
+% GLOBAL MINIMUM
+%
+% According to [4], the function has one global minimum at
+%
+% x = [0.1873 0.1906 0.5566 0.2647].
+%
+% The corresponding function value, with our definition of the test
+% function, is:
+%
+% f(x) = -3.729722308557300.
+%
+% Slightly better function values can be found in the neighborhood of
+% this point. For instance, with
+%
+% x = [0.18744768 0.19414868 0.558005333 0.26476409]
+%
+% we get
+%
+% f(x) = -3.729840440436292.
+%
+% REFERENCES
+%
+% [1] J. K. Hartman (1973). Some experiments in global optimization.
+% Naval Research Logistics Quarterly, 20(3):569-576.
+%
+% [2] V. Picheny, T. Wagner & D. Ginsbourger (2013). A benchmark
+% of kriging-based infill criteria for noisy optimization.
+% Structural and Multidisciplinary Optimization, 48:607-626.
+%
+% [3] L. C. W. Dixon & G. P. Szego (1978). Towards Global
+% Optimization 2, North-Holland, Amsterdam, The Netherlands
+%
+% [4] V. Picheny, D. Ginsbourger & O. Roustant (2021). DiceOptim:
+% Kriging-Based Optimization for Computer Experiments. R package
+% version 2.1.1. URL: https://CRAN.R-project.org/package=DiceOptim.
+
+% Author
+%
+% Julien Bect <julien.bect@centralesupelec.fr>
+
+% Copying Permission Statement (this file)
+%
+% To the extent possible under law, CentraleSupelec has waived all
+% copyright and related or neighboring rights to
+% stk_testfun_hartman4.m. This work is published from France.
+%
+% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
+
+% Copying Permission Statement (STK toolbox as a whole)
+%
+% This file is part of
+%
+% STK: a Small (Matlab/Octave) Toolbox for Kriging
+% (https://github.com/stk-kriging/stk/)
+%
+% STK is free software: you can redistribute it and/or modify it under
+% the terms of the GNU General Public License as published by the Free
+% Software Foundation, either version 3 of the License, or (at your
+% option) any later version.
+%
+% STK is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+% License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with STK. If not, see <http://www.gnu.org/licenses/>.
+
+function y = stk_testfun_hartman4 (x)
+
+a = [ ...
+ [ 10.00 0.05 3.00 17.00 ]; ...
+ [ 3.00 10.00 3.50 8.00 ]; ...
+ [ 17.00 17.00 1.70 0.05 ]; ...
+ [ 3.50 0.10 10.00 10.00 ]];
+
+p = [ ...
+ [ 0.1312 0.2329 0.2348 0.4047]; ...
+ [ 0.1696 0.4135 0.1451 0.8828]; ...
+ [ 0.5569 0.8307 0.3522 0.8732]; ...
+ [ 0.0124 0.3736 0.2883 0.5743]];
+
+c = [1.0 1.2 3.0 3.2];
+
+y = stk_testfun_hartman_generic (x, a, p, c);
+
+end % function
+
+
+%!test
+%! x = [0.1873 0.1906 0.5566 0.2647 ;
+%! 0.18744768 0.19414868 0.558005333 0.26476409];
+%! y = stk_testfun_hartman4 (x);
+%! assert (stk_isequal_tolabs (y, ...
+%! [-3.729722308557300; -3.729840440436292], 1e-15));
diff --git a/inst/examples/test_functions/stk_testfun_hartman6.m b/inst/examples/test_functions/stk_testfun_hartman6.m
new file mode 100644
index 0000000..865b549
--- /dev/null
+++ b/inst/examples/test_functions/stk_testfun_hartman6.m
@@ -0,0 +1,122 @@
+% STK_TESTFUN_HARTMAN6 computes the "Hartman6" function
+%
+% The Hartman6 function is a test function in dimension 6, which is
+% part of the famous Dixon & Szego benchmark [1] in global optimization.
+%
+% It is usually minimized over [0, 1]^6.
+%
+% HISTORICAL REMARKS
+%
+% This function belongs to a general class of test functions
+% introduced by Hartman [2], hence the name.
+%
+% The particular set of coefficients used in the definition of the
+% "Hartman6" function, however, seems to have been introduced by [1].
+%
+% GLOBAL MINIMUM
+%
+% According to [4], the function has one global minimum at
+%
+% x = [0.20169 0.150011 0.476874 0.275332 0.311652 0.657300].
+%
+% The corresponding function value is:
+%
+% f(x) = -3.322368011391339
+%
+% A slightly lower value is attained [5] at
+%
+% x = [0.20168952 0.15001069 0.47687398 ...
+% 0.27533243 0.31165162 0.65730054]
+%
+% The corresponding function value is:
+%
+% f(x) = -3.322368011415512
+%
+% The exact global optimum does not appear to be known.
+%
+% REFERENCES
+%
+% [1] L. C. W. Dixon & G. P. Szego (1978). Towards Global
+% Optimization 2, North-Holland, Amsterdam, The Netherlands
+%
+% [2] J. K. Hartman (1973). Some experiments in global optimization.
+% Naval Research Logistics Quarterly, 20(3):569-576.
+%
+% [3] V. Picheny, T. Wagner & D. Ginsbourger (2013). A benchmark
+% of kriging-based infill criteria for noisy optimization.
+% Structural and Multidisciplinary Optimization, 48:607-626.
+%
+% [4] S. Surjanovic & D. Bingham. Virtual Library of Simulation
+% Experiments: Test Functions and Datasets. Retrieved March 3,
+% 2022, https://www.sfu.ca/~ssurjano/hart4.html.
+%
+% [5] O. Roustant, D. Ginsbourger & Y. Deville (2012).
+% DiceKriging package, version 1.6.0 from 2021-02-23
+% URL: https://cran.r-project.org/web/packages/DiceKriging/index.html
+
+% Author
+%
+% Julien Bect <julien.bect@centralesupelec.fr>
+
+% Copying Permission Statement (this file)
+%
+% To the extent possible under law, CentraleSupelec has waived all
+% copyright and related or neighboring rights to
+% stk_testfun_hartman6.m. This work is published from France.
+%
+% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
+
+% Copying Permission Statement (STK toolbox as a whole)
+%
+% This file is part of
+%
+% STK: a Small (Matlab/Octave) Toolbox for Kriging
+% (https://github.com/stk-kriging/stk/)
+%
+% STK is free software: you can redistribute it and/or modify it under
+% the terms of the GNU General Public License as published by the Free
+% Software Foundation, either version 3 of the License, or (at your
+% option) any later version.
+%
+% STK is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+% License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with STK. If not, see <http://www.gnu.org/licenses/>.
+
+function y = stk_testfun_hartman6 (x)
+
+a = [ ...
+ [ 10.00 0.05 3.00 17.00 ]; ...
+ [ 3.00 10.00 3.50 8.00 ]; ...
+ [ 17.00 17.00 1.70 0.05 ]; ...
+ [ 3.50 0.10 10.00 10.00 ]; ...
+ [ 1.70 8.00 17.00 0.10 ]; ...
+ [ 8.00 14.00 8.00 14.00 ]];
+
+p = [ ...
+ [ 0.1312 0.2329 0.2348 0.4047 ]; ...
+ [ 0.1696 0.4135 0.1451 0.8828 ]; ...
+ [ 0.5569 0.8307 0.3522 0.8732 ]; ...
+ [ 0.0124 0.3736 0.2883 0.5743 ]; ...
+ [ 0.8283 0.1004 0.3047 0.1091 ]; ...
+ [ 0.5886 0.9991 0.6650 0.0381 ]];
+
+c = [1.0 1.2 3.0 3.2];
+
+y = stk_testfun_hartman_generic (x, a, p, c);
+
+end % function
+
+
+%!test
+%! x1 = [0.20169 0.150011 0.476874 0.275332 0.311652 0.657300];
+%! y1 = -3.322368011391339;
+%!
+%! x2 = [0.20168952 0.15001069 0.47687398 0.27533243 0.31165162 0.65730054];
+%! y2 = -3.322368011415512;
+%!
+%! y = stk_testfun_hartman6 ([x1; x2]);
+%! assert (stk_isequal_tolabs (y, [y1; y2], 1e-15))
diff --git a/inst/examples/test_functions/stk_testfun_hartman_generic.m b/inst/examples/test_functions/stk_testfun_hartman_generic.m
new file mode 100644
index 0000000..c7eb5e4
--- /dev/null
+++ b/inst/examples/test_functions/stk_testfun_hartman_generic.m
@@ -0,0 +1,103 @@
+% STK_TESTFUN_HARTMAN_GENERIC compute the value of a Hartman function
+%
+% CALL: Y = stk_testfun_hartman_generic (X, A, P, C)
+%
+% computes the value Y of the Hartman function with parameters A, P, C,
+% at the points contained in X.
+%
+% The size of Y is N x 1, where N is the number of rows of X.
+%
+% The parameters A, P and C should have size N x D, N x D and 1 x D
+% respectively, where D is the number of columns of X.
+%
+% HISTORICAL NOTE
+%
+% This class of test functions has been introduced by Hartman [2],
+% hence the name. The particular form of Hartman functions considered
+% here, however, seems to have been introduced by [1].
+%
+% The only difference between the particular form considered in [1] and
+% the general form in [2] is that the weighting matrix for the quadratic
+% form in the exponential is assumed to be diagonal.
+%
+% REFERENCES
+%
+% [1] L. C. W. Dixon & G. P. Szego (1978). Towards Global
+% Optimization 2, North-Holland, Amsterdam, The Netherlands
+%
+% [2] J. K. Hartman (1973). Some experiments in global optimization.
+% Naval Research Logistics Quarterly, 20(3):569-576.
+%
+% [3] V. Picheny, T. Wagner & D. Ginsbourger (2013). A benchmark
+% of kriging-based infill criteria for noisy optimization.
+% Structural and Multidisciplinary Optimization, 48:607-626.
+%
+% [4] MCS: Global Optimization by Multilevel Coordinate Search.
+% Version 2.0 from Feb. 8, 2000. Retrieved on March 10, 2022,
+% from https://www.mat.univie.ac.at/~neum/software/mcs/
+%
+% [5] S. Surjanovic & D. Bingham. Virtual Library of Simulation
+% Experiments: Test Functions and Datasets. Retrieved March 3,
+% 2022, https://www.sfu.ca/~ssurjano/hart4.html.
+%
+% See also stk_testfun_hartman3, stk_testfun_hartman4, stk_testfun_hartman6
+
+% Author
+%
+% Julien Bect <julien.bect@centralesupelec.fr>
+
+% IMPLEMENTATION
+%
+% This implementation has been written from scratch using [1, 3] as
+% references (omitting the scaling in [3]). Other implementations
+% available on the web, such as [4, 5], have only been used to check
+% the results for some special cases (Hartman3 and Hartman6 functions).
+
+% Copying Permission Statement (this file)
+%
+% To the extent possible under law, CentraleSupelec has waived all
+% copyright and related or neighboring rights to
+% stk_testfun_hartman_generic.m. This work is published from France.
+%
+% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
+
+% Copying Permission Statement (STK toolbox as a whole)
+%
+% This file is part of
+%
+% STK: a Small (Matlab/Octave) Toolbox for Kriging
+% (https://github.com/stk-kriging/stk/)
+%
+% STK is free software: you can redistribute it and/or modify it under
+% the terms of the GNU General Public License as published by the Free
+% Software Foundation, either version 3 of the License, or (at your
+% option) any later version.
+%
+% STK is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+% License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with STK. If not, see <http://www.gnu.org/licenses/>.
+
+function y = stk_testfun_hartman_generic (x, A, P, C)
+
+x = double (x);
+
+d = size (x, 2);
+m = size (A, 2);
+
+assert (isequal (size (A), [d m]));
+assert (isequal (size (P), [d m]));
+assert (isequal (size (C), [1 m]));
+
+% Compute inner sum
+inner_sum = sum ( ...
+ bsxfun (@times, shiftdim (A, -1), ...
+ (bsxfun (@minus, x, shiftdim (P, -1))) .^ 2), 2);
+
+% Compute the outer sum
+y = - sum (bsxfun (@times, shiftdim (C, -1), exp (- inner_sum)), 3);
+
+end % function
diff --git a/inst/examples/test_functions/stk_testfun_truss3_bb.m b/inst/examples/test_functions/stk_testfun_truss3_bb.m
index 19e87c0..a5f6738 100644
--- a/inst/examples/test_functions/stk_testfun_truss3_bb.m
+++ b/inst/examples/test_functions/stk_testfun_truss3_bb.m
@@ -4,20 +4,17 @@
%
% See also: stk_testcase_truss3, stk_testfun_truss3_vol
-% Copyright Notice
+% Author
%
-% This file: stk_testfun_truss3_bb.m was written in 2017
-% by Julien Bect <julien.bect@centralesupelec.fr>.
-%
-% To the extent possible under law, the author(s) have dedicated all
-% copyright and related and neighboring rights to this file to the pub-
-% lic domain worldwide. This file is distributed without any warranty.
+% Julien Bect <julien.bect@centralesupelec.fr>
+
+% Copying Permission Statement (this file)
%
-% This work is published from France.
+% To the extent possible under law, CentraleSupelec has waived all
+% copyright and related or neighboring rights to
+% stk_testfun_truss3_bb.m. This work is published from France.
%
-% You should have received a copy of the CC0 Public Domain Dedication
-% along with this file. If not, see
-% <http://creativecommons.org/publicdomain/zero/1.0/>.
+% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% Copying Permission Statement (STK toolbox as a whole)
%
diff --git a/inst/examples/test_functions/stk_testfun_truss3_vol.m b/inst/examples/test_functions/stk_testfun_truss3_vol.m
index b5cd2d7..be607c3 100644
--- a/inst/examples/test_functions/stk_testfun_truss3_vol.m
+++ b/inst/examples/test_functions/stk_testfun_truss3_vol.m
@@ -4,21 +4,17 @@
%
% See also: stk_testcase_truss3, stk_testfun_truss3_bb
-
-% Copyright Notice
-%
-% This file: stk_testfun_truss3_vol.m was written in 2017
-% by Julien Bect <julien.bect@centralesupelec.fr>.
+% Author
%
-% To the extent possible under law, the author(s) have dedicated all
-% copyright and related and neighboring rights to this file to the pub-
-% lic domain worldwide. This file is distributed without any warranty.
+% Julien Bect <julien.bect@centralesupelec.fr>
+
+% Copying Permission Statement (this file)
%
-% This work is published from France.
+% To the extent possible under law, CentraleSupelec has waived all
+% copyright and related or neighboring rights to
+% stk_testfun_truss3_vol.m. This work is published from France.
%
-% You should have received a copy of the CC0 Public Domain Dedication
-% along with this file. If not, see
-% <http://creativecommons.org/publicdomain/zero/1.0/>.
+% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% Copying Permission Statement (STK toolbox as a whole)
%
diff --git a/inst/examples/test_functions/stk_testfun_twobumps.m b/inst/examples/test_functions/stk_testfun_twobumps.m
index 4401d20..26d3594 100644
--- a/inst/examples/test_functions/stk_testfun_twobumps.m
+++ b/inst/examples/test_functions/stk_testfun_twobumps.m
@@ -10,17 +10,20 @@
%
% for x in [-1.0; 1.0].
-% Copyright Notice
+% Authors
%
-% Copyright (C) 2016 CentraleSupelec
+% Julien Bect <julien.bect@centralesupelec.fr>
+% Emmanuel Vazquez <emmanuel.vazquez@centralesupelec.fr>
+
+% Copying Permission Statement (this file)
%
-% Authors: Julien Bect <julien.bect@centralesupelec.fr>
-% Emmanuel Vazquez <emmanuel.vazquez@centralesupelec.fr>
+% To the extent possible under law, CentraleSupelec has waived all
+% copyright and related or neighboring rights to
+% stk_testfun_twobumps.m. This work is published from France.
%
-% This response function (its opposite, actually) has been present as an
-% example in the STK toolbox since the very first releases (STK 1.0, 2011).
+% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
-% Copying Permission Statement (STK toolbox)
+% Copying Permission Statement (STK toolbox as a whole)
%
% This file is part of
%
@@ -40,14 +43,6 @@
% You should have received a copy of the GNU General Public License
% along with STK. If not, see <http://www.gnu.org/licenses/>.
-% Copying Permission Statement (this file)
-%
-% To the extent possible under law, Julien Bect and Emmanuel Vazquez
-% have waived all copyright and related or neighboring rights to
-% stk_testfun_twobumps.m. This work is published from France.
-%
-% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
-
function z = stk_testfun_twobumps (x)
x = double (x);
diff --git a/inst/misc/benchmarks/stk_benchmark_uppertriangular.m b/inst/misc/benchmarks/stk_benchmark_uppertriangular.m
index a9092a8..1fe0d3f 100644
--- a/inst/misc/benchmarks/stk_benchmark_uppertriangular.m
+++ b/inst/misc/benchmarks/stk_benchmark_uppertriangular.m
@@ -62,7 +62,8 @@ for i = 1:NREP
end
t3 = toc ();
-t = [t1 t2 t3]'
+t = [t1 t2 t3]';
+display (t);
%% Second test: W * K^(-1) * W'
@@ -89,4 +90,5 @@ for i = 1:NREP
end
t3 = toc ();
-t = [t1 t2 t3]'
+t = [t1 t2 t3]';
+display (t);
diff --git a/inst/misc/dist/stk_filldist_exact.m b/inst/misc/dist/stk_filldist_exact.m
index b250dc1..3d2a893 100644
--- a/inst/misc/dist/stk_filldist_exact.m
+++ b/inst/misc/dist/stk_filldist_exact.m
@@ -146,7 +146,7 @@ end % function
function y = add_symm(x, box) %----------------------------------------------------------
-[n d] = size(x);
+[n, d] = size(x);
k = 2 * d + 1;
y = repmat(x, k, 1);
diff --git a/inst/misc/distrib/stk_distrib_bivnorm_cdf.m b/inst/misc/distrib/stk_distrib_bivnorm_cdf.m
index bfe637b..e106b03 100644
--- a/inst/misc/distrib/stk_distrib_bivnorm_cdf.m
+++ b/inst/misc/distrib/stk_distrib_bivnorm_cdf.m
@@ -66,12 +66,12 @@ q = nan (size (z1));
b1 = (sigma1 == 0.0);
if any (b1) % First component is zero a.s.
- [p(b1) q(b1)] = handle_singular_case (b1, z1, z2, sigma2);
+ [p(b1), q(b1)] = handle_singular_case (b1, z1, z2, sigma2);
end
b2 = (~ b1) & (sigma2 == 0.0);
if any (b2) % Second component is zero a.s.
- [p(b2) q(b2)] = handle_singular_case (b2, z2, z1, sigma1);
+ [p(b2), q(b2)] = handle_singular_case (b2, z2, z1, sigma1);
end
%--- Deal with the general case ------------------------------------------------
@@ -86,7 +86,7 @@ end
end % function
-function [p q] = handle_singular_case (b1, z1, z2, sigma2)
+function [p, q] = handle_singular_case (b1, z1, z2, sigma2)
z1_ = z1(b1);
z2_ = z2(b1);
@@ -99,7 +99,7 @@ q = ones (s);
b1p = (z1_ >= 0);
if any (b1p)
- [p(b1p) q(b1p)] = stk_distrib_normal_cdf (z2_(b1p), 0, sigma2_(b1p));
+ [p(b1p), q(b1p)] = stk_distrib_normal_cdf (z2_(b1p), 0, sigma2_(b1p));
end
end % function
diff --git a/inst/misc/optim/@stk_optim_octavesqp/private/sqp_quadprog.m b/inst/misc/optim/@stk_optim_octavesqp/private/sqp_quadprog.m
index 698e52d..d3870c5 100644
--- a/inst/misc/optim/@stk_optim_octavesqp/private/sqp_quadprog.m
+++ b/inst/misc/optim/@stk_optim_octavesqp/private/sqp_quadprog.m
@@ -828,3 +828,4 @@ end % function
%!error sqp_quadprog (1, cell (3,1), cell (2,1), cell (2,1),[],[],[], ones (2,2))
%!error sqp_quadprog (1, cell (3,1), cell (2,1), cell (2,1),[],[],[],-1)
+%#ok<*NASGU>
diff --git a/inst/misc/parallel/@stk_parallel_engine_parfor/stk_parallel_engine_parfor.m b/inst/misc/parallel/@stk_parallel_engine_parfor/stk_parallel_engine_parfor.m
index a3c2f7c..61c581a 100644
--- a/inst/misc/parallel/@stk_parallel_engine_parfor/stk_parallel_engine_parfor.m
+++ b/inst/misc/parallel/@stk_parallel_engine_parfor/stk_parallel_engine_parfor.m
@@ -29,7 +29,7 @@
function pareng = stk_parallel_engine_parfor()
-if exist ('parpool')
+if exist ('parpool') %#ok<EXIST>
try
parpool ();
diff --git a/inst/misc/test/stk_is_lhs.m b/inst/misc/test/stk_is_lhs.m
index 75f42ef..ae9f41d 100644
--- a/inst/misc/test/stk_is_lhs.m
+++ b/inst/misc/test/stk_is_lhs.m
@@ -50,10 +50,10 @@ function b = stk_is_lhs (x, n, dim, box)
x = double (x);
-if nargin == 1,
- [n dim] = size (x);
-elseif nargin == 2,
- if size (x, 1) ~= n,
+if nargin == 1
+ [n, dim] = size (x);
+elseif nargin == 2
+ if size (x, 1) ~= n
b = false; return;
end
dim = size (x, 2);
@@ -75,7 +75,7 @@ else
xmax = box.upper_bounds;
end
-for j = 1:dim,
+for j = 1:dim
y = x(:,j);
@@ -85,7 +85,7 @@ for j = 1:dim,
y = (y - xmin(j)) / (xmax(j) - xmin(j));
y = ceil (y * n);
- if ~ isequal (sort (y), (1:n)'),
+ if ~ isequal (sort (y), (1:n)')
b = false; return;
end
diff --git a/inst/misc/test/stk_isequal_tolabs.m b/inst/misc/test/stk_isequal_tolabs.m
index 76ff6c3..250e9f4 100644
--- a/inst/misc/test/stk_isequal_tolabs.m
+++ b/inst/misc/test/stk_isequal_tolabs.m
@@ -54,25 +54,25 @@ function res = stk_isequal_tolabs(a, b, tolabs)
DEFAULT_TOLABS = 1e-8;
-if nargin == 2,
+if nargin == 2
tolabs = DEFAULT_TOLABS;
end
-if isstruct(a) && isstruct(b),
+if isstruct(a) && isstruct(b)
L = fieldnames(a);
- if ~isequal(fieldnames(b), L),
+ if ~ isequal (fieldnames(b), L)
res = false;
return;
end
res = true;
- for k = 1:length(L),
- if ~isfield(b, L{k}),
+ for k = 1:length(L)
+ if ~ isfield (b, L{k})
res = false;
return;
end
res = stk_isequal_tolabs(a.(L{k}), b.(L{k}), tolabs);
- if ~ res,
+ if ~ res
return;
end
end
@@ -87,8 +87,8 @@ elseif ischar (a) && ischar (b)
elseif iscell (a) && iscell (b)
- for i = 1:numel(a),
- if ~stk_isequal_tolabs (a{i}, b{i}, tolabs);
+ for i = 1:numel(a)
+ if ~ stk_isequal_tolabs (a{i}, b{i}, tolabs)
res = false;
return;
end
diff --git a/inst/misc/test/stk_isequal_tolrel.m b/inst/misc/test/stk_isequal_tolrel.m
index 37c5296..b199066 100644
--- a/inst/misc/test/stk_isequal_tolrel.m
+++ b/inst/misc/test/stk_isequal_tolrel.m
@@ -58,20 +58,20 @@ function res = stk_isequal_tolrel(a, b, tolrel)
DEFAULT_TOLREL = 1e-8;
-if nargin == 2,
+if nargin == 2
tolrel = DEFAULT_TOLREL;
end
-if isstruct(a) && isstruct(b),
+if isstruct(a) && isstruct(b)
L = fieldnames(a);
- if ~isequal(fieldnames(b), L),
+ if ~isequal(fieldnames(b), L)
res = false;
return;
end
res = true;
- for k = 1:length(L),
- if ~isfield(b, L{k}),
+ for k = 1:length(L)
+ if ~ isfield(b, L{k})
res = false;
return;
end
@@ -96,8 +96,8 @@ elseif ischar (a) && ischar (b)
elseif iscell (a) && iscell (b)
- for i = 1:numel(a),
- if ~ stk_isequal_tolrel (a{i}, b{i}, tolrel);
+ for i = 1:numel(a)
+ if ~ stk_isequal_tolrel (a{i}, b{i}, tolrel)
res = false;
return;
end
diff --git a/inst/misc/test/stk_test.m b/inst/misc/test/stk_test.m
index f6375db..5cf834a 100644
--- a/inst/misc/test/stk_test.m
+++ b/inst/misc/test/stk_test.m
@@ -177,7 +177,7 @@ if (iscell (x__file))
end
end
if (isempty (x__file))
- if (exist (x__name) == 3)
+ if (exist (x__name) == 3) %#ok<EXIST>
fprintf (x__fid, '%s%s source code with tests for dynamically linked function not found\n', SIGNAL_EMPTY, x__name);
else
fprintf (x__fid, '%s%s does not exist in path\n', SIGNAL_EMPTY, x__name);
@@ -605,8 +605,8 @@ end % function
function body = x__extract_test_code (nm)
fid = fopen (nm, 'rt');
-if fid == -1,
- error(sprintf('File %s cannot be opened.', nm));
+if fid == -1
+ error ( sprintf ('File %s cannot be opened.', nm)); %#ok<SPERR>
end
body = '';
diff --git a/inst/sampling/@stk_sampcrit_ei/set.m b/inst/sampling/@stk_sampcrit_ei/set.m
index eaf0908..571e2e5 100644
--- a/inst/sampling/@stk_sampcrit_ei/set.m
+++ b/inst/sampling/@stk_sampcrit_ei/set.m
@@ -47,7 +47,6 @@ switch propname
if isempty (zi)
crit.current_minimum = +inf;
else
- n = size (zi, 1);
crit.current_minimum = min (zi);
end
diff --git a/inst/sampling/stk_sampling_nestedlhs.m b/inst/sampling/stk_sampling_nestedlhs.m
index 307aced..571313d 100644
--- a/inst/sampling/stk_sampling_nestedlhs.m
+++ b/inst/sampling/stk_sampling_nestedlhs.m
@@ -165,7 +165,7 @@ quotient = [1; quotient]; % no multiplication at the first level
row_highLevels = @(M, k, numb)(numb(M) - ( (numb(k) - 1):-1:0));
row_currentLevel = @(M, k, numb)(numb(M) - ( (numb(k) - 1):-1:numb(k + 1)) );
-for k_lev = nLev:-1:1; %begin by the end
+for k_lev = nLev:-1:1 % Begin by the end
list_nb = (1:n(k_lev))'; % list of all values we must get after this loop
n_new_k = n(k_lev) - n(k_lev + 1); % number of new value to add
diff --git a/inst/stk_version.m b/inst/stk_version.m
index f30a90a..6bb9a7c 100644
--- a/inst/stk_version.m
+++ b/inst/stk_version.m
@@ -2,7 +2,7 @@
% Copyright Notice
%
-% Copyright (C) 2015-2019 CentraleSupelec
+% Copyright (C) 2015-2023 CentraleSupelec
% Copyright (C) 2013, 2014 SUPELEC
%
% Author: Julien Bect <julien.bect@centralesupelec.fr>
@@ -29,6 +29,6 @@
function v = stk_version ()
-v = '2.7.0';
+v = '2.8.0';
end % function