├── .github └── workflows │ ├── python_testing.yml │ └── upload_pypi.yml ├── .gitignore ├── LICENSE.txt ├── MANIFEST.in ├── README.rst ├── dfols ├── __init__.py ├── controller.py ├── diagnostic_info.py ├── hessian.py ├── model.py ├── params.py ├── solver.py ├── tests │ ├── test_hessian.py │ ├── test_model.py │ ├── test_params.py │ ├── test_regu_model.py │ ├── test_regu_trust_region.py │ ├── test_regu_util.py │ ├── test_solver.py │ ├── test_trust_region.py │ └── test_util.py ├── trust_region.py └── util.py ├── docs ├── .nojekyll ├── Makefile ├── advanced.rst ├── build │ ├── doctrees │ │ ├── advanced.doctree │ │ ├── contributors.doctree │ │ ├── diagnostic.doctree │ │ ├── environment.pickle │ │ ├── history.doctree │ │ ├── index.doctree │ │ ├── info.doctree │ │ ├── install.doctree │ │ └── userguide.doctree │ ├── html │ │ ├── .buildinfo │ │ ├── .nojekyll │ │ ├── _images │ │ │ └── data_fitting.png │ │ ├── _sources │ │ │ ├── advanced.rst.txt │ │ │ ├── contributors.rst.txt │ │ │ ├── diagnostic.rst.txt │ │ │ ├── history.rst.txt │ │ │ ├── index.rst.txt │ │ │ ├── info.rst.txt │ │ │ ├── install.rst.txt │ │ │ └── userguide.rst.txt │ │ ├── _static │ │ │ ├── _sphinx_javascript_frameworks_compat.js │ │ │ ├── ajax-loader.gif │ │ │ ├── basic.css │ │ │ ├── comment-bright.png │ │ │ ├── comment-close.png │ │ │ ├── comment.png │ │ │ ├── css │ │ │ │ ├── badge_only.css │ │ │ │ ├── fonts │ │ │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ │ ├── lato-bold-italic.woff │ │ │ │ │ ├── lato-bold-italic.woff2 │ │ │ │ │ ├── lato-bold.woff │ │ │ │ │ ├── lato-bold.woff2 │ │ │ │ │ ├── lato-normal-italic.woff │ │ │ │ │ ├── lato-normal-italic.woff2 │ │ │ │ │ ├── lato-normal.woff │ │ │ │ │ └── lato-normal.woff2 │ │ │ │ └── theme.css │ │ │ ├── doctools.js │ │ │ ├── documentation_options.js │ │ │ ├── down-pressed.png │ │ │ ├── down.png │ │ │ ├── file.png │ │ │ ├── fonts │ │ │ │ ├── Inconsolata-Bold.ttf │ │ │ │ ├── Inconsolata-Regular.ttf │ │ │ │ ├── Inconsolata.ttf │ │ │ │ ├── Lato-Bold.ttf │ │ │ │ ├── Lato-Regular.ttf │ │ │ │ ├── Lato │ │ │ │ │ ├── lato-bold.eot │ │ │ │ │ ├── lato-bold.ttf │ │ │ │ │ ├── lato-bold.woff │ │ │ │ │ ├── lato-bold.woff2 │ │ │ │ │ ├── lato-bolditalic.eot │ │ │ │ │ ├── lato-bolditalic.ttf │ │ │ │ │ ├── lato-bolditalic.woff │ │ │ │ │ ├── lato-bolditalic.woff2 │ │ │ │ │ ├── lato-italic.eot │ │ │ │ │ ├── lato-italic.ttf │ │ │ │ │ ├── lato-italic.woff │ │ │ │ │ ├── lato-italic.woff2 │ │ │ │ │ ├── lato-regular.eot │ │ │ │ │ ├── lato-regular.ttf │ │ │ │ │ ├── lato-regular.woff │ │ │ │ │ └── lato-regular.woff2 │ │ │ │ ├── RobotoSlab-Bold.ttf │ │ │ │ ├── RobotoSlab-Regular.ttf │ │ │ │ ├── RobotoSlab │ │ │ │ │ ├── roboto-slab-v7-bold.eot │ │ │ │ │ ├── roboto-slab-v7-bold.ttf │ │ │ │ │ ├── roboto-slab-v7-bold.woff │ │ │ │ │ ├── roboto-slab-v7-bold.woff2 │ │ │ │ │ ├── roboto-slab-v7-regular.eot │ │ │ │ │ ├── roboto-slab-v7-regular.ttf │ │ │ │ │ ├── roboto-slab-v7-regular.woff │ │ │ │ │ └── roboto-slab-v7-regular.woff2 │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ ├── jquery-3.1.0.js │ │ │ ├── jquery-3.4.1.js │ │ │ ├── jquery.js │ │ │ ├── js │ │ │ │ ├── badge_only.js │ │ │ │ ├── html5shiv-printshiv.min.js │ │ │ │ ├── html5shiv.min.js │ │ │ │ ├── modernizr.min.js │ │ │ │ └── theme.js │ │ │ ├── language_data.js │ │ │ ├── minus.png │ │ │ ├── plus.png │ │ │ ├── pygments.css │ │ │ ├── searchtools.js │ │ │ ├── sphinx_highlight.js │ │ │ ├── underscore-1.3.1.js │ │ │ ├── underscore.js │ │ │ ├── up-pressed.png │ │ │ ├── up.png │ │ │ └── websupport.js │ │ ├── advanced.html │ │ ├── contributors.html │ │ ├── diagnostic.html │ │ ├── genindex.html │ │ ├── history.html │ │ ├── index.html │ │ ├── info.html │ │ ├── install.html │ │ ├── objects.inv │ │ ├── search.html │ │ ├── searchindex.js │ │ └── userguide.html │ └── latex │ │ ├── DFOLS.aux │ │ ├── DFOLS.fdb_latexmk │ │ ├── DFOLS.fls │ │ ├── DFOLS.idx │ │ ├── DFOLS.ilg │ │ ├── DFOLS.ind │ │ ├── DFOLS.log │ │ ├── DFOLS.out │ │ ├── DFOLS.pdf │ │ ├── DFOLS.tex │ │ ├── DFOLS.toc │ │ ├── LICRcyr2utf8.xdy │ │ ├── LICRlatin2utf8.xdy │ │ ├── LatinRules.xdy │ │ ├── Makefile │ │ ├── data_fitting.png │ │ ├── footnotehyper-sphinx.sty │ │ ├── latexmkjarc │ │ ├── latexmkrc │ │ ├── make.bat │ │ ├── python.ist │ │ ├── sphinx.sty │ │ ├── sphinx.xdy │ │ ├── sphinxcyrillic.sty │ │ ├── sphinxhighlight.sty │ │ ├── sphinxhowto.cls │ │ ├── sphinxlatexadmonitions.sty │ │ ├── sphinxlatexcontainers.sty │ │ ├── sphinxlatexgraphics.sty │ │ ├── sphinxlatexindbibtoc.sty │ │ ├── sphinxlatexlists.sty │ │ ├── sphinxlatexliterals.sty │ │ ├── sphinxlatexnumfig.sty │ │ ├── sphinxlatexobjects.sty │ │ ├── sphinxlatexshadowbox.sty │ │ ├── sphinxlatexstyleheadings.sty │ │ ├── sphinxlatexstylepage.sty │ │ ├── sphinxlatexstyletext.sty │ │ ├── sphinxlatextables.sty │ │ ├── sphinxmanual.cls │ │ ├── sphinxmessages.sty │ │ ├── sphinxmulticell.sty │ │ ├── sphinxoptionsgeometry.sty │ │ ├── sphinxoptionshyperref.sty │ │ ├── sphinxpackageboxes.sty │ │ ├── sphinxpackagecyrillic.sty │ │ └── sphinxpackagefootnote.sty ├── conf.py ├── contributors.rst ├── copy_html_to_maths.sh ├── data_fitting.png ├── diagnostic.rst ├── history.rst ├── index.html ├── index.rst ├── info.rst ├── install.rst ├── make.bat └── userguide.rst ├── examples ├── data_fitting.py ├── nonlinear_system.py ├── regularized_least_squares.py ├── rosenbrock_basic.py ├── rosenbrock_bounds.py ├── rosenbrock_constrained.py └── rosenbrock_noisy.py ├── manual.pdf └── pyproject.toml /.github/workflows/python_testing.yml: -------------------------------------------------------------------------------- 1 | name: Python package unit testing 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | os: [ubuntu-latest, macos-latest, windows-latest] 13 | python-version: ["3.9", "3.10", "3.11", "3.12"] 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | - name: Set up Python ${{ matrix.python-version }} 18 | uses: actions/setup-python@v5 19 | with: 20 | python-version: ${{ matrix.python-version }} 21 | - name: Install dependencies 22 | run: | 23 | python -m pip install . 24 | pip install pytest 25 | - name: Run unit tests 26 | run: | 27 | python -m pytest --pyargs dfols -------------------------------------------------------------------------------- /.github/workflows/upload_pypi.yml: -------------------------------------------------------------------------------- 1 | name: Package and upload to PyPI 2 | 3 | # Publish when a (published) GitHub Release is created, or manually 4 | on: 5 | workflow_dispatch: 6 | release: 7 | types: 8 | - published 9 | 10 | jobs: 11 | build: 12 | name: Build 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | 17 | - name: Set up Python 18 | uses: actions/setup-python@v5 19 | with: 20 | python-version: "3.x" 21 | 22 | - name: Install dependencies 23 | run: pip install build 24 | 25 | - name: Build binary wheel and source tarball 26 | run: python -m build 27 | 28 | - name: Store the distribution packages 29 | uses: actions/upload-artifact@v4 30 | with: 31 | name: python-package-distributions 32 | path: dist/ 33 | 34 | publish-to-pypi: 35 | name: Publish to PyPI 36 | needs: 37 | - build 38 | runs-on: ubuntu-latest 39 | environment: 40 | name: pypi 41 | url: https://pypi.org/p/DFO-LS 42 | permissions: 43 | id-token: write 44 | steps: 45 | - name: Download all the dists 46 | uses: actions/download-artifact@v4 47 | with: 48 | name: python-package-distributions 49 | path: dist/ 50 | - name: Publish distribution to PyPI 51 | uses: pypa/gh-action-pypi-publish@release/v1 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | */__pycache__ 3 | *.egg-info 4 | docs/_build 5 | dist/ 6 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE.txt 2 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | =================================================== 2 | DFO-LS: Derivative-Free Optimizer for Least-Squares 3 | =================================================== 4 | 5 | .. image:: https://github.com/numericalalgorithmsgroup/dfols/actions/workflows/python_testing.yml/badge.svg 6 | :target: https://github.com/numericalalgorithmsgroup/dfols/actions 7 | :alt: Build Status 8 | 9 | .. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg 10 | :target: https://www.gnu.org/licenses/gpl-3.0 11 | :alt: GNU GPL v3 License 12 | 13 | .. image:: https://img.shields.io/pypi/v/DFO-LS.svg 14 | :target: https://pypi.python.org/pypi/DFO-LS 15 | :alt: Latest PyPI version 16 | 17 | .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2630426.svg 18 | :target: https://doi.org/10.5281/zenodo.2630426 19 | :alt: DOI:10.5281/zenodo.2630426 20 | 21 | .. image:: https://static.pepy.tech/personalized-badge/dfo-ls?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads 22 | :target: https://pepy.tech/project/dfo-ls 23 | :alt: Total downloads 24 | 25 | DFO-LS is a flexible package for solving nonlinear least-squares minimization, without requiring derivatives of the objective. It is particularly useful when evaluations of the objective function are expensive and/or noisy. DFO-LS is more flexible version of `DFO-GN `_. 26 | 27 | The main algorithm is described in our paper [1] below. 28 | 29 | If you are interested in solving general optimization problems (without a least-squares structure), you may wish to try `Py-BOBYQA `_, which has many of the same features as DFO-LS. 30 | 31 | Documentation 32 | ------------- 33 | See manual.pdf or `here `_. 34 | 35 | Citation 36 | -------- 37 | The development of DFO-LS is outlined over several publications: 38 | 39 | 1. C Cartis, J Fiala, B Marteau and L Roberts, `Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers `_, *ACM Transactions on Mathematical Software*, 45:3 (2019), pp. 32:1-32:41 [`preprint arXiv 1804.00154 `_] . 40 | 2. M Hough and L Roberts, `Model-Based Derivative-Free Methods for Convex-Constrained Optimization `_, *SIAM Journal on Optimization*, 21:4 (2022), pp. 2552-2579 [`preprint arXiv 2111.05443 `_]. 41 | 3. Y Liu, K H Lam and L Roberts, `Black-box Optimization Algorithms for Regularized Least-squares Problems `_, *arXiv preprint arXiv:arXiv:2407.14915*, 2024. 42 | 43 | If you use DFO-LS in a paper, please cite [1]. 44 | If your problem has constraints, including bound constraints, please cite [1,2]. 45 | If your problem includes a regularizer, please cite [1,3]. 46 | 47 | Requirements 48 | ------------ 49 | DFO-LS requires the following software to be installed: 50 | 51 | * Python 3.9 or higher (http://www.python.org/) 52 | 53 | Additionally, the following python packages should be installed (these will be installed automatically if using *pip*, see `Installation using pip`_): 54 | 55 | * NumPy (http://www.numpy.org/) 56 | * SciPy version 1.11 or higher (http://www.scipy.org/) 57 | * Pandas (http://pandas.pydata.org/) 58 | 59 | **Optional package:** DFO-LS versions 1.2 and higher also support the `trustregion `_ package for fast trust-region subproblem solutions. To install this, make sure you have a Fortran compiler (e.g. `gfortran `_) and NumPy installed, then run :code:`pip install trustregion`. You do not have to have trustregion installed for DFO-LS to work, and it is not installed by default. 60 | 61 | Installation using conda 62 | ------------------------ 63 | DFO-LS can be directly installed in Anaconda environments using `conda-forge `_: 64 | 65 | .. code-block:: bash 66 | 67 | $ conda install -c conda-forge dfo-ls 68 | 69 | Installation using pip 70 | ---------------------- 71 | For easy installation, use `pip `_ as root: 72 | 73 | .. code-block:: bash 74 | 75 | $ pip install DFO-LS 76 | 77 | Note that if an older install of DFO-LS is present on your system you can use: 78 | 79 | .. code-block:: bash 80 | 81 | $ pip install --upgrade DFO-LS 82 | 83 | to upgrade DFO-LS to the latest version. 84 | 85 | Manual installation 86 | ------------------- 87 | Alternatively, you can download the source code from `Github `_ and unpack as follows: 88 | 89 | .. code-block:: bash 90 | 91 | $ git clone https://github.com/numericalalgorithmsgroup/dfols 92 | $ cd dfols 93 | 94 | DFO-LS is written in pure Python and requires no compilation. It can be installed using: 95 | 96 | .. code-block:: bash 97 | 98 | $ pip install . 99 | 100 | To upgrade DFO-LS to the latest version, navigate to the top-level directory (i.e. the one containing :code:`pyproject.toml`) and rerun the installation using :code:`pip`, as above: 101 | 102 | .. code-block:: bash 103 | 104 | $ git pull 105 | $ pip install . 106 | 107 | Testing 108 | ------- 109 | If you installed DFO-LS manually, you can test your installation using the pytest package: 110 | 111 | .. code-block:: bash 112 | 113 | $ pip install pytest 114 | $ python -m pytest --pyargs dfols 115 | 116 | Alternatively, the HTML documentation provides some simple examples of how to run DFO-LS. 117 | 118 | Examples 119 | -------- 120 | Examples of how to run DFO-LS are given in the `documentation `_, and the `examples `_ directory in Github. 121 | 122 | Uninstallation 123 | -------------- 124 | If DFO-LS was installed using *pip* you can uninstall as follows: 125 | 126 | .. code-block:: bash 127 | 128 | $ pip uninstall DFO-LS 129 | 130 | If DFO-LS was installed manually you have to remove the installed files by hand (located in your python site-packages directory). 131 | 132 | Bugs 133 | ---- 134 | Please report any bugs using `GitHub's issue tracker `_. 135 | 136 | License 137 | ------- 138 | This algorithm is released under the GNU GPL license. Please `contact NAG `_ for alternative licensing. 139 | -------------------------------------------------------------------------------- /dfols/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | DFO-LS 3 | ==== 4 | 5 | Derivative-Free Optimization for Least-Squares (DFO-LS) is a 6 | nonlinear least-squares solver which only requires function values. 7 | 8 | It solves the nonlinear least-squares problem: 9 | min_{x} f(x) = r1(x)**2 + ... + rm(x)**2, 10 | (optionally) subject to finitely many convex constraints, 11 | where each function ri(x) is differentiable, possibly nonconvex. 12 | Since the derivatives of ri(x) are never required or approximated, 13 | the solver works when the evaluation of ri(x) is noisy. 14 | 15 | ---- 16 | 17 | This program is free software: you can redistribute it and/or modify 18 | it under the terms of the GNU General Public License as published by 19 | the Free Software Foundation, either version 3 of the License, or 20 | (at your option) any later version. 21 | 22 | This program is distributed in the hope that it will be useful, 23 | but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | GNU General Public License for more details. 26 | 27 | You should have received a copy of the GNU General Public License 28 | along with this program. If not, see . 29 | 30 | The development of this software was sponsored by NAG Ltd. (http://www.nag.co.uk) 31 | and the EPSRC Centre For Doctoral Training in Industrially Focused Mathematical 32 | Modelling (EP/L015803/1) at the University of Oxford. Please contact NAG for 33 | alternative licensing. 34 | 35 | 36 | """ 37 | 38 | # Ensure compatibility with Python 2 39 | from __future__ import absolute_import, division, print_function, unicode_literals 40 | 41 | # DFO-LS version 42 | __version__ = '1.5.4' 43 | 44 | # Main solver & exit flags 45 | from .solver import * 46 | __all__ = ['solve', 'OptimResults'] 47 | 48 | -------------------------------------------------------------------------------- /dfols/hessian.py: -------------------------------------------------------------------------------- 1 | """ 2 | Hessian Module 3 | ==== 4 | 5 | This module contains a class representing a Hessian matrix, by only storing 6 | the upper triangular elements (since the matrix is symmetric). 7 | 8 | 9 | This program is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with this program. If not, see . 21 | 22 | The development of this software was sponsored by NAG Ltd. (http://www.nag.co.uk) 23 | and the EPSRC Centre For Doctoral Training in Industrially Focused Mathematical 24 | Modelling (EP/L015803/1) at the University of Oxford. Please contact NAG for 25 | alternative licensing. 26 | 27 | """ 28 | 29 | # Ensure compatibility with Python 2 30 | from __future__ import absolute_import, division, print_function, unicode_literals 31 | 32 | import numpy as np 33 | 34 | 35 | __all__ = ['Hessian'] 36 | 37 | 38 | class Hessian(object): 39 | def __init__(self, n, vals=None): 40 | self.n = n 41 | if vals is None: 42 | self.hq = np.zeros((n * (n + 1) // 2,), dtype=float) 43 | else: 44 | assert isinstance(vals, np.ndarray), "Can only set Hessian from NumPy array" 45 | assert len(vals.shape) in [1, 2], "Can only set Hessian from vector or matrix" 46 | if len(vals.shape) == 1: 47 | assert vals.shape[0] == self.n * (self.n + 1) // 2, "Incompatible n and input vector" 48 | self.hq = vals 49 | else: 50 | # Input was matrix 51 | assert vals.shape == (self.n, self.n), "Incompatible n and input matrix" 52 | self.hq = to_upper_triangular_vector(vals) 53 | 54 | def __len__(self): 55 | return len(self.hq) 56 | 57 | def dim(self): 58 | return self.n 59 | 60 | def shape(self): 61 | return self.hq.shape 62 | 63 | def upper_triangular(self): 64 | return self.hq 65 | 66 | def check_valid_index(self, i, j): 67 | assert i >= 0, "Index i must be >= 0" 68 | assert i <= self.n-1, "Index i must be <= n-1" 69 | assert j >= 0, "Index j must be >= 0" 70 | assert j <= self.n-1, "Index j must be <= n-1" 71 | 72 | def as_full(self): 73 | A = np.zeros((self.n, self.n)) 74 | ih = -1 75 | for j in range(self.n): # j = 0, ..., n-1 76 | for i in range(j + 1): # i = 0, ..., j 77 | ih += 1 78 | A[i, j] = self.hq[ih] 79 | A[j, i] = self.hq[ih] 80 | return A 81 | 82 | def get_element(self, i, j): 83 | self.check_valid_index(i, j) 84 | ih = -1 85 | for k1 in range(self.n): 86 | for k2 in range(k1 + 1): 87 | ih += 1 88 | if (k1 == i and k2 == j) or (k1 == j and k2 == i): 89 | return self.hq[ih] 90 | return None 91 | 92 | def set_element(self, i, j, val): 93 | self.check_valid_index(i, j) 94 | ih = -1 95 | for k1 in range(self.n): 96 | for k2 in range(k1 + 1): 97 | ih += 1 98 | if (k1 == i and k2 == j) or (k1 == j and k2 == i): 99 | self.hq[ih] = val 100 | return 101 | 102 | def vec_mul(self, s): 103 | # Matrix-vector product 104 | assert isinstance(s, np.ndarray), "Can only multiply Hessian by a NumPy array" 105 | assert len(s.shape) == 1, "Can only multiply Hessian by a vector" 106 | assert s.shape == (self.n,), "Vector has incorrect length (expect %g, got %g)" % (self.n, s.shape[0]) 107 | hs = np.zeros((self.n,)) 108 | ih = -1 109 | for j in range(self.n): # j = 0, ..., n-1 110 | for i in range(j + 1): # i = 0, ..., j 111 | ih += 1 112 | if i < j: 113 | hs[j] += self.hq[ih] * s[i] 114 | hs[i] += self.hq[ih] * s[j] 115 | return hs 116 | 117 | def __mul__(self, other): 118 | return self.vec_mul(other) 119 | 120 | 121 | def to_upper_triangular_vector(A): 122 | n = A.shape[0] 123 | hq = np.zeros((n*(n+1)//2,)) 124 | ih = -1 125 | for j in range(n): # j = 0, ..., n-1 126 | for i in range(j + 1): # i = 0, ..., j 127 | ih += 1 128 | hq[ih] = A[i,j] 129 | return hq 130 | -------------------------------------------------------------------------------- /dfols/tests/test_params.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | This program is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program. If not, see . 15 | 16 | The development of this software was sponsored by NAG Ltd. (http://www.nag.co.uk) 17 | and the EPSRC Centre For Doctoral Training in Industrially Focused Mathematical 18 | Modelling (EP/L015803/1) at the University of Oxford. Please contact NAG for 19 | alternative licensing. 20 | 21 | """ 22 | 23 | # Ensure compatibility with Python 2 24 | from __future__ import absolute_import, division, print_function, unicode_literals 25 | 26 | import unittest 27 | 28 | from dfols.params import ParameterList 29 | 30 | 31 | class TestAccess(unittest.TestCase): 32 | def runTest(self): 33 | n = 3 34 | npt = n + 1 35 | maxfun = 50 * (n + 1) 36 | p = ParameterList(n, npt, maxfun) 37 | self.assertFalse(p("init.random_initial_directions"), 'Bad init dirns/access') 38 | p("init.random_initial_directions", True) # set to True 39 | self.assertTrue(p("init.random_initial_directions"), 'Bad init dirns/access') 40 | 41 | 42 | class TestFail(unittest.TestCase): 43 | def runTest(self): 44 | n = 3 45 | npt = n + 1 46 | maxfun = 50 * (n + 1) 47 | p = ParameterList(n, npt, maxfun) 48 | p("init.random_initial_directions", False) # set to False 49 | self.assertFalse(p("init.random_initial_directions"), 'Bad init dirns/access') 50 | self.assertRaises(ValueError, lambda: p("init.random_initial_directions", False)) # should fail 51 | self.assertRaises(ValueError, lambda: p("fake_parameter_name")) # should fail 52 | self.assertRaises(ValueError, lambda: p("fake_parameter_name", False)) # should fail 53 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/.nojekyll -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = python3 -msphinx 7 | SPHINXPROJ = DFOLS 8 | SOURCEDIR = . 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/build/doctrees/advanced.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/doctrees/advanced.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/contributors.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/doctrees/contributors.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/diagnostic.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/doctrees/diagnostic.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/build/doctrees/history.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/doctrees/history.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/info.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/doctrees/info.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/install.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/doctrees/install.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/userguide.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/doctrees/userguide.doctree -------------------------------------------------------------------------------- /docs/build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 412cd91ff985b9489bd71148f8919cdf 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/build/html/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/.nojekyll -------------------------------------------------------------------------------- /docs/build/html/_images/data_fitting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_images/data_fitting.png -------------------------------------------------------------------------------- /docs/build/html/_sources/contributors.rst.txt: -------------------------------------------------------------------------------- 1 | Contributors 2 | ============ 3 | 4 | Main author 5 | ----------- 6 | * `Lindon Roberts `_ (University of Sydney) 7 | 8 | Contributors 9 | ------------ 10 | * Matthew Hough (University of Waterloo): handle general convex constraints [version 1.3] 11 | * Yanjun Liu (Princeton University): nonsmooth regularizer [version 1.5] 12 | * Kevin Lam (Australian National University): nonsmooth regularizer [version 1.5] 13 | -------------------------------------------------------------------------------- /docs/build/html/_sources/diagnostic.rst.txt: -------------------------------------------------------------------------------- 1 | Diagnostic Information 2 | ====================== 3 | In :doc:`userguide`, we saw that the output of DFO-LS returns a container which includes diagnostic information about the progress of the algorithm (:code:`soln.diagnostic_info`). This object is a `Pandas `_ DataFrame, with one row per iteration of the algorithm. In this section, we explain the meaning of each type of output (the columns of the DataFrame). 4 | 5 | To save this information to a CSV file, use: 6 | 7 | .. code-block:: python 8 | 9 | # Previously: define objfun and x0 10 | 11 | # Turn on diagnostic information 12 | user_params = {'logging.save_diagnostic_info': True} 13 | 14 | # Call DFO-LS 15 | soln = dfols.solve(objfun, x0, user_params=user_params) 16 | 17 | # Save diagnostic info to CSV 18 | soln.diagnostic_info.to_csv('myfile.csv') 19 | 20 | Depending on exactly how DFO-LS terminates, the last row of results may not be fully populated. 21 | 22 | Current Iterate 23 | --------------- 24 | * :code:`xk` - Best point found so far (current iterate). This is only saved if :code:`user_params['logging.save_xk'] = True`. 25 | * :code:`rk` - The vector of residuals at the current iterate. This is only saved if :code:`user_params['logging.save_rk'] = True`. 26 | * :code:`fk` - The value of :math:`f` at the current iterate. 27 | 28 | Trust Region 29 | ------------ 30 | * :code:`rho` - The lower bound on the trust region radius :math:`\rho_k`. 31 | * :code:`delta` - The trust region radius :math:`\Delta_k`. 32 | * :code:`norm_sk` - The norm of the trust region step :math:`\|s_k\|`. 33 | 34 | Model Interpolation 35 | ------------------- 36 | * :code:`npt` - The number of interpolation points. 37 | * :code:`interpolation_error` - The sum of squares of the interpolation errors from the interpolated model. 38 | * :code:`interpolation_condition_number` - The condition number of the matrix in the interpolation linear system. 39 | * :code:`interpolation_change_J_norm` - The Frobenius norm of the change in Jacobian at this iteration, :math:`\|J_k-J_{k-1}\|_F`. 40 | * :code:`interpolation_total_residual` - The total residual from the interpolation optimization problem. 41 | * :code:`poisedness` - The smallest value of :math:`\Lambda` for which the current interpolation set :math:`Y_k` is :math:`\Lambda`-poised in the current trust region. This is the most expensive piece of information to compute, and is only computed if :code:`user_params['logging.save_poisedness' = True`. 42 | * :code:`max_distance_xk` - The maximum distance from any interpolation point to the current iterate. 43 | * :code:`norm_gk` - The norm of the model gradient :math:`\|g_k\|`. 44 | 45 | Iteration Count 46 | --------------- 47 | * :code:`nruns` - The number of times the algorithm has been restarted. 48 | * :code:`nf` - The number of objective evaluations so far (see :code:`soln.nf`) 49 | * :code:`nx` - The number of points at which the objective has been evaluated so far (see :code:`soln.nx`) 50 | * :code:`nsamples` - The total number of objective evaluations used for all current interpolation points. 51 | * :code:`iter_this_run` - The number of iterations since the last restart. 52 | * :code:`iters_total` - The total number of iterations so far. 53 | 54 | Algorithm Progress 55 | ------------------ 56 | * :code:`iter_type` - A text description of what type of iteration we had (e.g. Successful, Safety, etc.) 57 | * :code:`ratio` - The ratio of actual to predicted objective reduction in the trust region step. 58 | * :code:`slow_iter` - Equal to 1 if the current iteration is successful but slow, 0 if is successful but not slow, and -1 if was not successful. 59 | 60 | -------------------------------------------------------------------------------- /docs/build/html/_sources/history.rst.txt: -------------------------------------------------------------------------------- 1 | Version History 2 | =============== 3 | This section lists the different versions of DFO-LS and the updates between them. 4 | 5 | Version 1.0 (6 Feb 2018) 6 | ------------------------ 7 | * Initial release of DFO-LS 8 | 9 | Version 1.0.1 (20 Feb 2018) 10 | --------------------------- 11 | * Minor bug fix to trust region subproblem solver (the output :code:`crvmin` is calculated correctly) - this has minimal impact on the performance of DFO-LS. 12 | 13 | Version 1.0.2 (20 Jun 2018) 14 | --------------------------- 15 | * Extra optional input :code:`args` which passes through arguments for :code:`objfun`. 16 | * Bug fixes: default parameters for reduced initialization cost regime, returning correct value if exiting from within a safety step, retrieving dependencies during installation. 17 | 18 | Version 1.1 (16 Jan 2019) 19 | ------------------------- 20 | * Use different default reduced initialization cost method for inverse problems to ensure whole space is searched correctly. 21 | * Bug fixes: default trust region radius when scaling feasible region, exit correctly when no Jacobian returned, handling overflow at initial value 22 | 23 | Version 1.1.1 (5 Apr 2019) 24 | -------------------------- 25 | * Link code to Zenodo, to create DOI - no changes to the DFO-LS algorithm. 26 | 27 | Version 1.2 (12 Feb 2020) 28 | ------------------------- 29 | * Use deterministic initialisation by default (so it is no longer necessary to set a random seed for reproducibility of DFO-LS results). 30 | * Full model Hessian stored rather than just upper triangular part - this improves the runtime of Hessian-based operations. 31 | * Faster trust-region and geometry subproblem solutions in Fortran using the `trustregion `_ package. 32 | * Faster interpolation solution for multiple right-hand sides. 33 | * Don't adjust starting point if it is close to the bounds (as long as it is feasible). 34 | * Option to stop default logging behavior and/or enable per-iteration printing. 35 | * Bugfix: correctly handle 1-sided bounds as inputs, avoid divide-by-zero warnings when auto-detecting restarts. 36 | 37 | Version 1.2.1 (13 Feb 2020) 38 | --------------------------- 39 | * Make the use of the `trustregion `_ package optional, not installed by default. 40 | 41 | Version 1.2.2 (26 Feb 2021) 42 | --------------------------- 43 | * Minor update to remove NumPy deprecation warnings - no changes to the DFO-LS algorithm. 44 | 45 | Version 1.2.3 (1 Jun 2021) 46 | --------------------------- 47 | * Minor update to customise handling of NaNs in objective evaluations - no changes to the DFO-LS algorithm. 48 | 49 | Version 1.3.0 (8 Nov 2021) 50 | --------------------------- 51 | * Handle finitely many arbitrary convex constraints in addition to simple bound constraints. 52 | * Add module-level logging for more informative log outputs. 53 | * Only new functionality is added, so there is no change to the solver for unconstrained/bound-constrained problems. 54 | 55 | Version 1.4.0 (29 Jan 2024) 56 | --------------------------- 57 | * Require newer SciPy version (at least 1.11) as a dependency - avoids occasional undetermined behavior but no changes to the DFO-LS algorithm. 58 | * Gracefully handle NaN objective value from evaluation at a new trial point (trust-region step). 59 | 60 | Version 1.4.1 (11 Apr 2024) 61 | --------------------------- 62 | * Migrate package setup to pyproject.toml (required for Python version 3.12) 63 | * Drop support for Python 2.7 and <=3.8 in line with SciPy >=1.11 dependency (introduced v1.4.0) 64 | 65 | Version 1.5.0 (11 Sep 2024) 66 | --------------------------- 67 | * Add support for (possibly nonsmooth) regularizer term. 68 | * Drop warning about infeasible initial point if the point is on an upper/lower bound. 69 | 70 | Version 1.5.1 (10 Oct 2024) 71 | --------------------------- 72 | * Add return values :code:`soln.xmin_eval_num` and :code:`soln.jacmin_eval_nums` 73 | * Allow option for parallel initial evaluations for non-random directions if :code:`npt` not too large 74 | 75 | Version 1.5.2 (28 Oct 2024) 76 | --------------------------- 77 | * Bugfix for saving diagnostic info (bug introduced in v1.5.1) 78 | 79 | Version 1.5.3 (30 Oct 2024) 80 | --------------------------- 81 | * Bugfix when starting solver at problem minimizer (bug introduced in v1.5.1) 82 | 83 | Version 1.5.4 (11 Feb 2025) 84 | --------------------------- 85 | * Bugfix when printing results from a run which terminated early 86 | * Add ability to save/load results to/from a dictionary 87 | -------------------------------------------------------------------------------- /docs/build/html/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. DFO-LS documentation master file, created by 2 | You can adapt this file completely to your liking, but it should at least 3 | contain the root `toctree` directive. 4 | 5 | DFO-LS: Derivative-Free Optimizer for Least-Squares Minimization 6 | ================================================================ 7 | 8 | **Release:** |version| 9 | 10 | **Date:** |today| 11 | 12 | **Author:** `Lindon Roberts `_ 13 | 14 | DFO-LS is a flexible package for finding local solutions to nonlinear least-squares minimization problems (with optional regularizer and constraints), without requiring any derivatives of the objective. DFO-LS stands for Derivative-Free Optimizer for Least-Squares. 15 | 16 | That is, DFO-LS solves 17 | 18 | .. math:: 19 | 20 | \min_{x\in\mathbb{R}^n} &\quad f(x) := \sum_{i=1}^{m}r_{i}(x)^2 + h(x) \\ 21 | \text{s.t.} &\quad a \leq x \leq b\\ 22 | &\quad x \in C := C_1 \cap \cdots \cap C_n, \quad \text{all $C_i$ convex}\\ 23 | 24 | The optional regularizer :math:`h(x)` is a Lipschitz continuous and convex, but possibly non-differentiable function that is typically used to avoid overfitting. 25 | A common choice is :math:`h(x)=\lambda \|x\|_1` (called L1 regularization or LASSO) for :math:`\lambda>0`. 26 | Note that in the case of Tikhonov regularization/ridge regression, :math:`h(x)=\lambda\|x\|_2^2` is not Lipschitz continuous, so should instead be incorporated by adding an extra term into the least-squares sum, :math:`r_{m+1}(x)=\sqrt{\lambda} \|x\|_2`. 27 | The (optional) constraint set :math:`C` is the intersection of multiple convex sets provided as input by the user. All constraints are non-relaxable (i.e. DFO-LS will never ask to evaluate a point that is not feasible), although the general constraints :math:`x\in C` may be slightly violated from rounding errors. 28 | 29 | Full details of the DFO-LS algorithm are given in our papers: 30 | 31 | 1. C. Cartis, J. Fiala, B. Marteau and L. Roberts, `Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers `_, *ACM Transactions on Mathematical Software*, 45:3 (2019), pp. 32:1-32:41 [`preprint `_] . 32 | 2. M. Hough, and L. Roberts, `Model-Based Derivative-Free Methods for Convex-Constrained Optimization `_, *SIAM Journal on Optimization*, 21:4 (2022), pp. 2552-2579 [`preprint `_]. 33 | 3. Y. Liu, K. H. Lam and L. Roberts, `Black-box Optimization Algorithms for Regularized Least-squares Problems `_, *arXiv preprint arXiv:arXiv:2407.14915*, 2024. 34 | 35 | DFO-LS is a more flexible version of `DFO-GN `_. 36 | 37 | If you are interested in solving general optimization problems (without a least-squares structure), you may wish to try `Py-BOBYQA `_, which has many of the same features as DFO-LS. 38 | 39 | DFO-LS is released under the GNU General Public License. Please `contact NAG `_ for alternative licensing. 40 | 41 | .. toctree:: 42 | :maxdepth: 2 43 | :caption: Contents: 44 | 45 | install 46 | info 47 | userguide 48 | advanced 49 | diagnostic 50 | history 51 | contributors 52 | 53 | Acknowledgements 54 | ---------------- 55 | This software was initially developed under the supervision of `Coralia Cartis `_, and was supported by the EPSRC Centre For Doctoral Training in `Industrially Focused Mathematical Modelling `_ (EP/L015803/1) in collaboration with the `Numerical Algorithms Group `_. Development of DFO-LS has also been supported by the Australian Research Council (DE240100006). 56 | -------------------------------------------------------------------------------- /docs/build/html/_sources/install.rst.txt: -------------------------------------------------------------------------------- 1 | Installing DFO-LS 2 | ================= 3 | 4 | Requirements 5 | ------------ 6 | DFO-LS requires the following software to be installed: 7 | 8 | * Python 3.9 or higher (http://www.python.org/) 9 | 10 | Additionally, the following python packages should be installed (these will be installed automatically if using *pip*, see `Installation using pip`_): 11 | 12 | * NumPy (http://www.numpy.org/) 13 | * SciPy version 1.11 or higher (http://www.scipy.org/) 14 | * Pandas (http://pandas.pydata.org/) 15 | 16 | **Optional package:** DFO-LS versions 1.2 and higher also support the `trustregion `_ package for fast trust-region subproblem solutions. To install this, make sure you have a Fortran compiler (e.g. `gfortran `_) and NumPy installed, then run :code:`pip install trustregion`. You do not have to have trustregion installed for DFO-LS to work, and it is not installed by default. 17 | 18 | Installation using conda 19 | ------------------------ 20 | DFO-LS can be directly installed in Anaconda environments using `conda-forge `_: 21 | 22 | .. code-block:: bash 23 | 24 | $ conda install -c conda-forge dfo-ls 25 | 26 | Installation using pip 27 | ---------------------- 28 | For easy installation, use *pip* (http://www.pip-installer.org/) as root: 29 | 30 | .. code-block:: bash 31 | 32 | $ pip install DFO-LS 33 | 34 | Note that if an older install of DFO-LS is present on your system you can use: 35 | 36 | .. code-block:: bash 37 | 38 | $ pip install --upgrade DFO-LS 39 | 40 | to upgrade DFO-LS to the latest version. 41 | 42 | Manual installation 43 | ------------------- 44 | Alternatively, you can download the source code from `Github `_ and unpack as follows: 45 | 46 | .. code-block:: bash 47 | 48 | $ git clone https://github.com/numericalalgorithmsgroup/dfols 49 | $ cd dfols 50 | 51 | DFO-LS is written in pure Python and requires no compilation. It can be installed using: 52 | 53 | .. code-block:: bash 54 | 55 | $ pip install . 56 | 57 | To upgrade DFO-LS to the latest version, navigate to the top-level directory (i.e. the one containing :code:`pyproject.toml`) and rerun the installation using :code:`pip`, as above: 58 | 59 | .. code-block:: bash 60 | 61 | $ git pull 62 | $ pip install . 63 | 64 | Testing 65 | ------- 66 | If you installed DFO-LS manually, you can test your installation using the pytest package: 67 | 68 | .. code-block:: bash 69 | 70 | $ pip install pytest 71 | $ python -m pytest --pyargs dfols 72 | 73 | Alternatively, this documentation provides some simple examples of how to run DFO-LS. 74 | 75 | Uninstallation 76 | -------------- 77 | If DFO-LS was installed using *pip* you can uninstall as follows: 78 | 79 | .. code-block:: bash 80 | 81 | $ pip uninstall DFO-LS 82 | 83 | If DFO-LS was installed manually you have to remove the installed files by hand (located in your python site-packages directory). 84 | 85 | -------------------------------------------------------------------------------- /docs/build/html/_static/_sphinx_javascript_frameworks_compat.js: -------------------------------------------------------------------------------- 1 | /* Compatability shim for jQuery and underscores.js. 2 | * 3 | * Copyright Sphinx contributors 4 | * Released under the two clause BSD licence 5 | */ 6 | 7 | /** 8 | * small helper function to urldecode strings 9 | * 10 | * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL 11 | */ 12 | jQuery.urldecode = function(x) { 13 | if (!x) { 14 | return x 15 | } 16 | return decodeURIComponent(x.replace(/\+/g, ' ')); 17 | }; 18 | 19 | /** 20 | * small helper function to urlencode strings 21 | */ 22 | jQuery.urlencode = encodeURIComponent; 23 | 24 | /** 25 | * This function returns the parsed url parameters of the 26 | * current request. Multiple values per key are supported, 27 | * it will always return arrays of strings for the value parts. 28 | */ 29 | jQuery.getQueryParameters = function(s) { 30 | if (typeof s === 'undefined') 31 | s = document.location.search; 32 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 33 | var result = {}; 34 | for (var i = 0; i < parts.length; i++) { 35 | var tmp = parts[i].split('=', 2); 36 | var key = jQuery.urldecode(tmp[0]); 37 | var value = jQuery.urldecode(tmp[1]); 38 | if (key in result) 39 | result[key].push(value); 40 | else 41 | result[key] = [value]; 42 | } 43 | return result; 44 | }; 45 | 46 | /** 47 | * highlight a given string on a jquery object by wrapping it in 48 | * span elements with the given class name. 49 | */ 50 | jQuery.fn.highlightText = function(text, className) { 51 | function highlight(node, addItems) { 52 | if (node.nodeType === 3) { 53 | var val = node.nodeValue; 54 | var pos = val.toLowerCase().indexOf(text); 55 | if (pos >= 0 && 56 | !jQuery(node.parentNode).hasClass(className) && 57 | !jQuery(node.parentNode).hasClass("nohighlight")) { 58 | var span; 59 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 60 | if (isInSVG) { 61 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 62 | } else { 63 | span = document.createElement("span"); 64 | span.className = className; 65 | } 66 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 67 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 68 | document.createTextNode(val.substr(pos + text.length)), 69 | node.nextSibling)); 70 | node.nodeValue = val.substr(0, pos); 71 | if (isInSVG) { 72 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 73 | var bbox = node.parentElement.getBBox(); 74 | rect.x.baseVal.value = bbox.x; 75 | rect.y.baseVal.value = bbox.y; 76 | rect.width.baseVal.value = bbox.width; 77 | rect.height.baseVal.value = bbox.height; 78 | rect.setAttribute('class', className); 79 | addItems.push({ 80 | "parent": node.parentNode, 81 | "target": rect}); 82 | } 83 | } 84 | } 85 | else if (!jQuery(node).is("button, select, textarea")) { 86 | jQuery.each(node.childNodes, function() { 87 | highlight(this, addItems); 88 | }); 89 | } 90 | } 91 | var addItems = []; 92 | var result = this.each(function() { 93 | highlight(this, addItems); 94 | }); 95 | for (var i = 0; i < addItems.length; ++i) { 96 | jQuery(addItems[i].parent).before(addItems[i].target); 97 | } 98 | return result; 99 | }; 100 | 101 | /* 102 | * backward compatibility for jQuery.browser 103 | * This will be supported until firefox bug is fixed. 104 | */ 105 | if (!jQuery.browser) { 106 | jQuery.uaMatch = function(ua) { 107 | ua = ua.toLowerCase(); 108 | 109 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 110 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 111 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 112 | /(msie) ([\w.]+)/.exec(ua) || 113 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 114 | []; 115 | 116 | return { 117 | browser: match[ 1 ] || "", 118 | version: match[ 2 ] || "0" 119 | }; 120 | }; 121 | jQuery.browser = {}; 122 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 123 | } 124 | -------------------------------------------------------------------------------- /docs/build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /docs/build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /docs/build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/comment-close.png -------------------------------------------------------------------------------- /docs/build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/comment.png -------------------------------------------------------------------------------- /docs/build/html/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Base JavaScript utilities for all Sphinx HTML documentation. 6 | * 7 | * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | "use strict"; 12 | 13 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 14 | "TEXTAREA", 15 | "INPUT", 16 | "SELECT", 17 | "BUTTON", 18 | ]); 19 | 20 | const _ready = (callback) => { 21 | if (document.readyState !== "loading") { 22 | callback(); 23 | } else { 24 | document.addEventListener("DOMContentLoaded", callback); 25 | } 26 | }; 27 | 28 | /** 29 | * Small JavaScript module for the documentation. 30 | */ 31 | const Documentation = { 32 | init: () => { 33 | Documentation.initDomainIndexTable(); 34 | Documentation.initOnKeyListeners(); 35 | }, 36 | 37 | /** 38 | * i18n support 39 | */ 40 | TRANSLATIONS: {}, 41 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 42 | LOCALE: "unknown", 43 | 44 | // gettext and ngettext don't access this so that the functions 45 | // can safely bound to a different name (_ = Documentation.gettext) 46 | gettext: (string) => { 47 | const translated = Documentation.TRANSLATIONS[string]; 48 | switch (typeof translated) { 49 | case "undefined": 50 | return string; // no translation 51 | case "string": 52 | return translated; // translation exists 53 | default: 54 | return translated[0]; // (singular, plural) translation tuple exists 55 | } 56 | }, 57 | 58 | ngettext: (singular, plural, n) => { 59 | const translated = Documentation.TRANSLATIONS[singular]; 60 | if (typeof translated !== "undefined") 61 | return translated[Documentation.PLURAL_EXPR(n)]; 62 | return n === 1 ? singular : plural; 63 | }, 64 | 65 | addTranslations: (catalog) => { 66 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 67 | Documentation.PLURAL_EXPR = new Function( 68 | "n", 69 | `return (${catalog.plural_expr})` 70 | ); 71 | Documentation.LOCALE = catalog.locale; 72 | }, 73 | 74 | /** 75 | * helper function to focus on search bar 76 | */ 77 | focusSearchBar: () => { 78 | document.querySelectorAll("input[name=q]")[0]?.focus(); 79 | }, 80 | 81 | /** 82 | * Initialise the domain index toggle buttons 83 | */ 84 | initDomainIndexTable: () => { 85 | const toggler = (el) => { 86 | const idNumber = el.id.substr(7); 87 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 88 | if (el.src.substr(-9) === "minus.png") { 89 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 90 | toggledRows.forEach((el) => (el.style.display = "none")); 91 | } else { 92 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 93 | toggledRows.forEach((el) => (el.style.display = "")); 94 | } 95 | }; 96 | 97 | const togglerElements = document.querySelectorAll("img.toggler"); 98 | togglerElements.forEach((el) => 99 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 100 | ); 101 | togglerElements.forEach((el) => (el.style.display = "")); 102 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 103 | }, 104 | 105 | initOnKeyListeners: () => { 106 | // only install a listener if it is really needed 107 | if ( 108 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 109 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 110 | ) 111 | return; 112 | 113 | document.addEventListener("keydown", (event) => { 114 | // bail for input elements 115 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 116 | // bail with special keys 117 | if (event.altKey || event.ctrlKey || event.metaKey) return; 118 | 119 | if (!event.shiftKey) { 120 | switch (event.key) { 121 | case "ArrowLeft": 122 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 123 | 124 | const prevLink = document.querySelector('link[rel="prev"]'); 125 | if (prevLink && prevLink.href) { 126 | window.location.href = prevLink.href; 127 | event.preventDefault(); 128 | } 129 | break; 130 | case "ArrowRight": 131 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 132 | 133 | const nextLink = document.querySelector('link[rel="next"]'); 134 | if (nextLink && nextLink.href) { 135 | window.location.href = nextLink.href; 136 | event.preventDefault(); 137 | } 138 | break; 139 | } 140 | } 141 | 142 | // some keyboard layouts may need Shift to get / 143 | switch (event.key) { 144 | case "/": 145 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 146 | Documentation.focusSearchBar(); 147 | event.preventDefault(); 148 | } 149 | }); 150 | }, 151 | }; 152 | 153 | // quick alias for translations 154 | const _ = Documentation.gettext; 155 | 156 | _ready(Documentation.init); 157 | -------------------------------------------------------------------------------- /docs/build/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | const DOCUMENTATION_OPTIONS = { 2 | VERSION: '1.5.4', 3 | LANGUAGE: 'en', 4 | COLLAPSE_INDEX: false, 5 | BUILDER: 'html', 6 | FILE_SUFFIX: '.html', 7 | LINK_SUFFIX: '.html', 8 | HAS_SOURCE: true, 9 | SOURCELINK_SUFFIX: '.txt', 10 | NAVIGATION_WITH_KEYS: false, 11 | SHOW_SEARCH_SUMMARY: true, 12 | ENABLE_SEARCH_SHORTCUTS: true, 13 | }; -------------------------------------------------------------------------------- /docs/build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /docs/build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/down.png -------------------------------------------------------------------------------- /docs/build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/file.png -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Inconsolata-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Inconsolata-Regular.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Inconsolata.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-bold.eot -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-bold.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-bold.woff -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-bolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-bolditalic.eot -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-bolditalic.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-bolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-bolditalic.woff -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-bolditalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-bolditalic.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-italic.eot -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-italic.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-italic.woff -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-italic.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-regular.eot -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-regular.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-regular.woff -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/Lato/lato-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/Lato/lato-regular.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab-Bold.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab-Regular.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/build/html/_static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/build/html/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/build/html/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/build/html/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | !function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 63 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 64 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 65 | var s_v = "^(" + C + ")?" + v; // vowel in stem 66 | 67 | this.stemWord = function (w) { 68 | var stem; 69 | var suffix; 70 | var firstch; 71 | var origword = w; 72 | 73 | if (w.length < 3) 74 | return w; 75 | 76 | var re; 77 | var re2; 78 | var re3; 79 | var re4; 80 | 81 | firstch = w.substr(0,1); 82 | if (firstch == "y") 83 | w = firstch.toUpperCase() + w.substr(1); 84 | 85 | // Step 1a 86 | re = /^(.+?)(ss|i)es$/; 87 | re2 = /^(.+?)([^s])s$/; 88 | 89 | if (re.test(w)) 90 | w = w.replace(re,"$1$2"); 91 | else if (re2.test(w)) 92 | w = w.replace(re2,"$1$2"); 93 | 94 | // Step 1b 95 | re = /^(.+?)eed$/; 96 | re2 = /^(.+?)(ed|ing)$/; 97 | if (re.test(w)) { 98 | var fp = re.exec(w); 99 | re = new RegExp(mgr0); 100 | if (re.test(fp[1])) { 101 | re = /.$/; 102 | w = w.replace(re,""); 103 | } 104 | } 105 | else if (re2.test(w)) { 106 | var fp = re2.exec(w); 107 | stem = fp[1]; 108 | re2 = new RegExp(s_v); 109 | if (re2.test(stem)) { 110 | w = stem; 111 | re2 = /(at|bl|iz)$/; 112 | re3 = new RegExp("([^aeiouylsz])\\1$"); 113 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 114 | if (re2.test(w)) 115 | w = w + "e"; 116 | else if (re3.test(w)) { 117 | re = /.$/; 118 | w = w.replace(re,""); 119 | } 120 | else if (re4.test(w)) 121 | w = w + "e"; 122 | } 123 | } 124 | 125 | // Step 1c 126 | re = /^(.+?)y$/; 127 | if (re.test(w)) { 128 | var fp = re.exec(w); 129 | stem = fp[1]; 130 | re = new RegExp(s_v); 131 | if (re.test(stem)) 132 | w = stem + "i"; 133 | } 134 | 135 | // Step 2 136 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 137 | if (re.test(w)) { 138 | var fp = re.exec(w); 139 | stem = fp[1]; 140 | suffix = fp[2]; 141 | re = new RegExp(mgr0); 142 | if (re.test(stem)) 143 | w = stem + step2list[suffix]; 144 | } 145 | 146 | // Step 3 147 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | suffix = fp[2]; 152 | re = new RegExp(mgr0); 153 | if (re.test(stem)) 154 | w = stem + step3list[suffix]; 155 | } 156 | 157 | // Step 4 158 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 159 | re2 = /^(.+?)(s|t)(ion)$/; 160 | if (re.test(w)) { 161 | var fp = re.exec(w); 162 | stem = fp[1]; 163 | re = new RegExp(mgr1); 164 | if (re.test(stem)) 165 | w = stem; 166 | } 167 | else if (re2.test(w)) { 168 | var fp = re2.exec(w); 169 | stem = fp[1] + fp[2]; 170 | re2 = new RegExp(mgr1); 171 | if (re2.test(stem)) 172 | w = stem; 173 | } 174 | 175 | // Step 5 176 | re = /^(.+?)e$/; 177 | if (re.test(w)) { 178 | var fp = re.exec(w); 179 | stem = fp[1]; 180 | re = new RegExp(mgr1); 181 | re2 = new RegExp(meq1); 182 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 183 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 184 | w = stem; 185 | } 186 | re = /ll$/; 187 | re2 = new RegExp(mgr1); 188 | if (re.test(w) && re2.test(w)) { 189 | re = /.$/; 190 | w = w.replace(re,""); 191 | } 192 | 193 | // and turn initial Y back to y 194 | if (firstch == "y") 195 | w = firstch.toLowerCase() + w.substr(1); 196 | return w; 197 | } 198 | } 199 | 200 | -------------------------------------------------------------------------------- /docs/build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/minus.png -------------------------------------------------------------------------------- /docs/build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/plus.png -------------------------------------------------------------------------------- /docs/build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #eeffcc; } 8 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 9 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 10 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 11 | .highlight .o { color: #666666 } /* Operator */ 12 | .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 18 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ 21 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 22 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 23 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 24 | .highlight .go { color: #333333 } /* Generic.Output */ 25 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 26 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 27 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 28 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 29 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 30 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 31 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 32 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 33 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 34 | .highlight .kt { color: #902000 } /* Keyword.Type */ 35 | .highlight .m { color: #208050 } /* Literal.Number */ 36 | .highlight .s { color: #4070a0 } /* Literal.String */ 37 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 38 | .highlight .nb { color: #007020 } /* Name.Builtin */ 39 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 40 | .highlight .no { color: #60add5 } /* Name.Constant */ 41 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 42 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 43 | .highlight .ne { color: #007020 } /* Name.Exception */ 44 | .highlight .nf { color: #06287e } /* Name.Function */ 45 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 46 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 47 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 48 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 49 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 50 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 51 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 52 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 53 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 54 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 55 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 56 | .highlight .sa { color: #4070a0 } /* Literal.String.Affix */ 57 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 58 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 59 | .highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ 60 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 61 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 62 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 63 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 64 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 65 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 66 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 67 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 68 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 69 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 70 | .highlight .fm { color: #06287e } /* Name.Function.Magic */ 71 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 72 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 73 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 74 | .highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ 75 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/build/html/_static/sphinx_highlight.js: -------------------------------------------------------------------------------- 1 | /* Highlighting utilities for Sphinx HTML documentation. */ 2 | "use strict"; 3 | 4 | const SPHINX_HIGHLIGHT_ENABLED = true 5 | 6 | /** 7 | * highlight a given string on a node by wrapping it in 8 | * span elements with the given class name. 9 | */ 10 | const _highlight = (node, addItems, text, className) => { 11 | if (node.nodeType === Node.TEXT_NODE) { 12 | const val = node.nodeValue; 13 | const parent = node.parentNode; 14 | const pos = val.toLowerCase().indexOf(text); 15 | if ( 16 | pos >= 0 && 17 | !parent.classList.contains(className) && 18 | !parent.classList.contains("nohighlight") 19 | ) { 20 | let span; 21 | 22 | const closestNode = parent.closest("body, svg, foreignObject"); 23 | const isInSVG = closestNode && closestNode.matches("svg"); 24 | if (isInSVG) { 25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 26 | } else { 27 | span = document.createElement("span"); 28 | span.classList.add(className); 29 | } 30 | 31 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 32 | const rest = document.createTextNode(val.substr(pos + text.length)); 33 | parent.insertBefore( 34 | span, 35 | parent.insertBefore( 36 | rest, 37 | node.nextSibling 38 | ) 39 | ); 40 | node.nodeValue = val.substr(0, pos); 41 | /* There may be more occurrences of search term in this node. So call this 42 | * function recursively on the remaining fragment. 43 | */ 44 | _highlight(rest, addItems, text, className); 45 | 46 | if (isInSVG) { 47 | const rect = document.createElementNS( 48 | "http://www.w3.org/2000/svg", 49 | "rect" 50 | ); 51 | const bbox = parent.getBBox(); 52 | rect.x.baseVal.value = bbox.x; 53 | rect.y.baseVal.value = bbox.y; 54 | rect.width.baseVal.value = bbox.width; 55 | rect.height.baseVal.value = bbox.height; 56 | rect.setAttribute("class", className); 57 | addItems.push({ parent: parent, target: rect }); 58 | } 59 | } 60 | } else if (node.matches && !node.matches("button, select, textarea")) { 61 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); 62 | } 63 | }; 64 | const _highlightText = (thisNode, text, className) => { 65 | let addItems = []; 66 | _highlight(thisNode, addItems, text, className); 67 | addItems.forEach((obj) => 68 | obj.parent.insertAdjacentElement("beforebegin", obj.target) 69 | ); 70 | }; 71 | 72 | /** 73 | * Small JavaScript module for the documentation. 74 | */ 75 | const SphinxHighlight = { 76 | 77 | /** 78 | * highlight the search words provided in localstorage in the text 79 | */ 80 | highlightSearchWords: () => { 81 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight 82 | 83 | // get and clear terms from localstorage 84 | const url = new URL(window.location); 85 | const highlight = 86 | localStorage.getItem("sphinx_highlight_terms") 87 | || url.searchParams.get("highlight") 88 | || ""; 89 | localStorage.removeItem("sphinx_highlight_terms") 90 | url.searchParams.delete("highlight"); 91 | window.history.replaceState({}, "", url); 92 | 93 | // get individual terms from highlight string 94 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); 95 | if (terms.length === 0) return; // nothing to do 96 | 97 | // There should never be more than one element matching "div.body" 98 | const divBody = document.querySelectorAll("div.body"); 99 | const body = divBody.length ? divBody[0] : document.querySelector("body"); 100 | window.setTimeout(() => { 101 | terms.forEach((term) => _highlightText(body, term, "highlighted")); 102 | }, 10); 103 | 104 | const searchBox = document.getElementById("searchbox"); 105 | if (searchBox === null) return; 106 | searchBox.appendChild( 107 | document 108 | .createRange() 109 | .createContextualFragment( 110 | '" 114 | ) 115 | ); 116 | }, 117 | 118 | /** 119 | * helper function to hide the search marks again 120 | */ 121 | hideSearchWords: () => { 122 | document 123 | .querySelectorAll("#searchbox .highlight-link") 124 | .forEach((el) => el.remove()); 125 | document 126 | .querySelectorAll("span.highlighted") 127 | .forEach((el) => el.classList.remove("highlighted")); 128 | localStorage.removeItem("sphinx_highlight_terms") 129 | }, 130 | 131 | initEscapeListener: () => { 132 | // only install a listener if it is really needed 133 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; 134 | 135 | document.addEventListener("keydown", (event) => { 136 | // bail for input elements 137 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 138 | // bail with special keys 139 | if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; 140 | if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { 141 | SphinxHighlight.hideSearchWords(); 142 | event.preventDefault(); 143 | } 144 | }); 145 | }, 146 | }; 147 | 148 | _ready(() => { 149 | /* Do not call highlightSearchWords() when we are on the search page. 150 | * It will highlight words from the *previous* search query. 151 | */ 152 | if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); 153 | SphinxHighlight.initEscapeListener(); 154 | }); 155 | -------------------------------------------------------------------------------- /docs/build/html/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/up-pressed.png -------------------------------------------------------------------------------- /docs/build/html/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/_static/up.png -------------------------------------------------------------------------------- /docs/build/html/contributors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Contributors — DFO-LS v1.5.4 documentation 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 67 | 68 |
72 | 73 |
74 |
75 |
76 | 83 |
84 |
85 |
86 |
87 | 88 |
89 |

Contributors

90 |
91 |

Main author

92 | 95 |
96 |
97 |

Contributors

98 |
    99 |
  • Matthew Hough (University of Waterloo): handle general convex constraints [version 1.3]

  • 100 |
  • Yanjun Liu (Princeton University): nonsmooth regularizer [version 1.5]

  • 101 |
  • Kevin Lam (Australian National University): nonsmooth regularizer [version 1.5]

  • 102 |
103 |
104 |
105 | 106 | 107 |
108 |
109 |
112 | 113 |
114 | 115 |
116 |

© Copyright 2017-2025, Lindon Roberts.

117 |
118 | 119 | Built with Sphinx using a 120 | theme 121 | provided by Read the Docs. 122 | 123 | 124 |
125 |
126 |
127 |
128 |
129 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /docs/build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Index — DFO-LS v1.5.4 documentation 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 61 | 62 |
66 | 67 |
68 |
69 |
70 |
    71 |
  • 72 | 73 |
  • 74 |
  • 75 |
76 |
77 |
78 |
79 |
80 | 81 | 82 |

Index

83 | 84 |
85 | 86 |
87 | 88 | 89 |
90 |
91 |
92 | 93 |
94 | 95 |
96 |

© Copyright 2017-2025, Lindon Roberts.

97 |
98 | 99 | Built with Sphinx using a 100 | theme 101 | provided by Read the Docs. 102 | 103 | 104 |
105 |
106 |
107 |
108 |
109 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /docs/build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/html/objects.inv -------------------------------------------------------------------------------- /docs/build/html/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Search — DFO-LS v1.5.4 documentation 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 64 | 65 |
69 | 70 |
71 |
72 |
73 |
    74 |
  • 75 | 76 |
  • 77 |
  • 78 |
79 |
80 |
81 |
82 |
83 | 84 | 91 | 92 | 93 |
94 | 95 |
96 | 97 |
98 |
99 |
100 | 101 |
102 | 103 |
104 |

© Copyright 2017-2025, Lindon Roberts.

105 |
106 | 107 | Built with Sphinx using a 108 | theme 109 | provided by Read the Docs. 110 | 111 | 112 |
113 |
114 |
115 |
116 |
117 | 122 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /docs/build/latex/DFOLS.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/latex/DFOLS.idx -------------------------------------------------------------------------------- /docs/build/latex/DFOLS.ilg: -------------------------------------------------------------------------------- 1 | This is makeindex, version 2.15 [TeX Live 2022/dev] (kpathsea + Thai support). 2 | Scanning style file ./python.ist.......done (7 attributes redefined, 0 ignored). 3 | Scanning input file DFOLS.idx...done (0 entries accepted, 0 rejected). 4 | Nothing written in DFOLS.ind. 5 | Transcript written in DFOLS.ilg. 6 | -------------------------------------------------------------------------------- /docs/build/latex/DFOLS.ind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/latex/DFOLS.ind -------------------------------------------------------------------------------- /docs/build/latex/DFOLS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/latex/DFOLS.pdf -------------------------------------------------------------------------------- /docs/build/latex/DFOLS.toc: -------------------------------------------------------------------------------- 1 | \babel@toc {english}{}\relax 2 | \contentsline {chapter}{\numberline {1}Installing DFO\sphinxhyphen {}LS}{3}{chapter.1}% 3 | \contentsline {section}{\numberline {1.1}Requirements}{3}{section.1.1}% 4 | \contentsline {section}{\numberline {1.2}Installation using conda}{3}{section.1.2}% 5 | \contentsline {section}{\numberline {1.3}Installation using pip}{3}{section.1.3}% 6 | \contentsline {section}{\numberline {1.4}Manual installation}{4}{section.1.4}% 7 | \contentsline {section}{\numberline {1.5}Testing}{4}{section.1.5}% 8 | \contentsline {section}{\numberline {1.6}Uninstallation}{4}{section.1.6}% 9 | \contentsline {chapter}{\numberline {2}Overview}{5}{chapter.2}% 10 | \contentsline {section}{\numberline {2.1}When to use DFO\sphinxhyphen {}LS}{5}{section.2.1}% 11 | \contentsline {section}{\numberline {2.2}Parameter Fitting}{5}{section.2.2}% 12 | \contentsline {section}{\numberline {2.3}Solving Nonlinear Systems of Equations}{6}{section.2.3}% 13 | \contentsline {section}{\numberline {2.4}Details of the DFO\sphinxhyphen {}LS Algorithm}{7}{section.2.4}% 14 | \contentsline {section}{\numberline {2.5}References}{7}{section.2.5}% 15 | \contentsline {chapter}{\numberline {3}Using DFO\sphinxhyphen {}LS}{9}{chapter.3}% 16 | \contentsline {section}{\numberline {3.1}Nonlinear Least\sphinxhyphen {}Squares Minimization}{9}{section.3.1}% 17 | \contentsline {section}{\numberline {3.2}How to use DFO\sphinxhyphen {}LS}{9}{section.3.2}% 18 | \contentsline {section}{\numberline {3.3}Optional Arguments}{11}{section.3.3}% 19 | \contentsline {section}{\numberline {3.4}A Simple Example}{12}{section.3.4}% 20 | \contentsline {section}{\numberline {3.5}Adding Bounds and More Output}{13}{section.3.5}% 21 | \contentsline {section}{\numberline {3.6}Adding General Convex Constraints}{15}{section.3.6}% 22 | \contentsline {section}{\numberline {3.7}Adding a Regularizer}{16}{section.3.7}% 23 | \contentsline {section}{\numberline {3.8}Example: Noisy Objective Evaluation}{18}{section.3.8}% 24 | \contentsline {section}{\numberline {3.9}Example: Parameter Estimation/Data Fitting}{20}{section.3.9}% 25 | \contentsline {section}{\numberline {3.10}Example: Solving a Nonlinear System of Equations}{22}{section.3.10}% 26 | \contentsline {section}{\numberline {3.11}References}{23}{section.3.11}% 27 | \contentsline {chapter}{\numberline {4}Advanced Usage}{25}{chapter.4}% 28 | \contentsline {section}{\numberline {4.1}General Algorithm Parameters}{25}{section.4.1}% 29 | \contentsline {section}{\numberline {4.2}Logging and Output}{25}{section.4.2}% 30 | \contentsline {section}{\numberline {4.3}Initialization of Points}{26}{section.4.3}% 31 | \contentsline {section}{\numberline {4.4}Trust Region Management}{26}{section.4.4}% 32 | \contentsline {section}{\numberline {4.5}Termination on Small Objective Value}{26}{section.4.5}% 33 | \contentsline {section}{\numberline {4.6}Termination on Slow Progress}{26}{section.4.6}% 34 | \contentsline {section}{\numberline {4.7}Stochastic Noise Information}{27}{section.4.7}% 35 | \contentsline {section}{\numberline {4.8}Interpolation Management}{27}{section.4.8}% 36 | \contentsline {section}{\numberline {4.9}Regression Model Management}{27}{section.4.9}% 37 | \contentsline {section}{\numberline {4.10}Multiple Restarts}{27}{section.4.10}% 38 | \contentsline {section}{\numberline {4.11}Dynamically Growing Initial Set}{28}{section.4.11}% 39 | \contentsline {section}{\numberline {4.12}Dykstra’s Algorithm}{29}{section.4.12}% 40 | \contentsline {section}{\numberline {4.13}Checking Matrix Rank}{29}{section.4.13}% 41 | \contentsline {section}{\numberline {4.14}Handling regularizer}{29}{section.4.14}% 42 | \contentsline {section}{\numberline {4.15}References}{30}{section.4.15}% 43 | \contentsline {chapter}{\numberline {5}Diagnostic Information}{31}{chapter.5}% 44 | \contentsline {section}{\numberline {5.1}Current Iterate}{31}{section.5.1}% 45 | \contentsline {section}{\numberline {5.2}Trust Region}{31}{section.5.2}% 46 | \contentsline {section}{\numberline {5.3}Model Interpolation}{32}{section.5.3}% 47 | \contentsline {section}{\numberline {5.4}Iteration Count}{32}{section.5.4}% 48 | \contentsline {section}{\numberline {5.5}Algorithm Progress}{32}{section.5.5}% 49 | \contentsline {chapter}{\numberline {6}Version History}{33}{chapter.6}% 50 | \contentsline {section}{\numberline {6.1}Version 1.0 (6 Feb 2018)}{33}{section.6.1}% 51 | \contentsline {section}{\numberline {6.2}Version 1.0.1 (20 Feb 2018)}{33}{section.6.2}% 52 | \contentsline {section}{\numberline {6.3}Version 1.0.2 (20 Jun 2018)}{33}{section.6.3}% 53 | \contentsline {section}{\numberline {6.4}Version 1.1 (16 Jan 2019)}{33}{section.6.4}% 54 | \contentsline {section}{\numberline {6.5}Version 1.1.1 (5 Apr 2019)}{34}{section.6.5}% 55 | \contentsline {section}{\numberline {6.6}Version 1.2 (12 Feb 2020)}{34}{section.6.6}% 56 | \contentsline {section}{\numberline {6.7}Version 1.2.1 (13 Feb 2020)}{34}{section.6.7}% 57 | \contentsline {section}{\numberline {6.8}Version 1.2.2 (26 Feb 2021)}{34}{section.6.8}% 58 | \contentsline {section}{\numberline {6.9}Version 1.2.3 (1 Jun 2021)}{34}{section.6.9}% 59 | \contentsline {section}{\numberline {6.10}Version 1.3.0 (8 Nov 2021)}{34}{section.6.10}% 60 | \contentsline {section}{\numberline {6.11}Version 1.4.0 (29 Jan 2024)}{35}{section.6.11}% 61 | \contentsline {section}{\numberline {6.12}Version 1.4.1 (11 Apr 2024)}{35}{section.6.12}% 62 | \contentsline {section}{\numberline {6.13}Version 1.5.0 (11 Sep 2024)}{35}{section.6.13}% 63 | \contentsline {section}{\numberline {6.14}Version 1.5.1 (10 Oct 2024)}{35}{section.6.14}% 64 | \contentsline {section}{\numberline {6.15}Version 1.5.2 (28 Oct 2024)}{35}{section.6.15}% 65 | \contentsline {section}{\numberline {6.16}Version 1.5.3 (30 Oct 2024)}{35}{section.6.16}% 66 | \contentsline {section}{\numberline {6.17}Version 1.5.4 (11 Feb 2025)}{35}{section.6.17}% 67 | \contentsline {chapter}{\numberline {7}Contributors}{37}{chapter.7}% 68 | \contentsline {section}{\numberline {7.1}Main author}{37}{section.7.1}% 69 | \contentsline {section}{\numberline {7.2}Contributors}{37}{section.7.2}% 70 | \contentsline {chapter}{\numberline {8}Acknowledgements}{39}{chapter.8}% 71 | \contentsline {chapter}{Bibliography}{41}{chapter*.3}% 72 | -------------------------------------------------------------------------------- /docs/build/latex/LICRcyr2utf8.xdy: -------------------------------------------------------------------------------- 1 | ;; -*- coding: utf-8; mode: Lisp; -*- 2 | ;; style file for xindy 3 | ;; filename: LICRcyr2utf8.xdy 4 | ;; description: style file for xindy which maps back LaTeX Internal 5 | ;; Character Representation of Cyrillic to utf-8 6 | ;; usage: for use with pdflatex produced .idx files. 7 | ;; Contributed by the Sphinx team, July 2018. 8 | (merge-rule "\IeC {\'\CYRG }" "Ѓ" :string) 9 | (merge-rule "\IeC {\'\CYRK }" "Ќ" :string) 10 | (merge-rule "\IeC {\'\cyrg }" "ѓ" :string) 11 | (merge-rule "\IeC {\'\cyrk }" "ќ" :string) 12 | (merge-rule "\IeC {\CYRA }" "А" :string) 13 | (merge-rule "\IeC {\CYRB }" "Б" :string) 14 | (merge-rule "\IeC {\CYRC }" "Ц" :string) 15 | (merge-rule "\IeC {\CYRCH }" "Ч" :string) 16 | (merge-rule "\IeC {\CYRD }" "Д" :string) 17 | (merge-rule "\IeC {\CYRDJE }" "Ђ" :string) 18 | (merge-rule "\IeC {\CYRDZE }" "Ѕ" :string) 19 | (merge-rule "\IeC {\CYRDZHE }" "Џ" :string) 20 | (merge-rule "\IeC {\CYRE }" "Е" :string) 21 | (merge-rule "\IeC {\CYREREV }" "Э" :string) 22 | (merge-rule "\IeC {\CYRERY }" "Ы" :string) 23 | (merge-rule "\IeC {\CYRF }" "Ф" :string) 24 | (merge-rule "\IeC {\CYRG }" "Г" :string) 25 | (merge-rule "\IeC {\CYRGUP }" "Ґ" :string) 26 | (merge-rule "\IeC {\CYRH }" "Х" :string) 27 | (merge-rule "\IeC {\CYRHRDSN }" "Ъ" :string) 28 | (merge-rule "\IeC {\CYRI }" "И" :string) 29 | (merge-rule "\IeC {\CYRIE }" "Є" :string) 30 | (merge-rule "\IeC {\CYRII }" "І" :string) 31 | (merge-rule "\IeC {\CYRISHRT }" "Й" :string) 32 | (merge-rule "\IeC {\CYRJE }" "Ј" :string) 33 | (merge-rule "\IeC {\CYRK }" "К" :string) 34 | (merge-rule "\IeC {\CYRL }" "Л" :string) 35 | (merge-rule "\IeC {\CYRLJE }" "Љ" :string) 36 | (merge-rule "\IeC {\CYRM }" "М" :string) 37 | (merge-rule "\IeC {\CYRN }" "Н" :string) 38 | (merge-rule "\IeC {\CYRNJE }" "Њ" :string) 39 | (merge-rule "\IeC {\CYRO }" "О" :string) 40 | (merge-rule "\IeC {\CYRP }" "П" :string) 41 | (merge-rule "\IeC {\CYRR }" "Р" :string) 42 | (merge-rule "\IeC {\CYRS }" "С" :string) 43 | (merge-rule "\IeC {\CYRSFTSN }" "Ь" :string) 44 | (merge-rule "\IeC {\CYRSH }" "Ш" :string) 45 | (merge-rule "\IeC {\CYRSHCH }" "Щ" :string) 46 | (merge-rule "\IeC {\CYRT }" "Т" :string) 47 | (merge-rule "\IeC {\CYRTSHE }" "Ћ" :string) 48 | (merge-rule "\IeC {\CYRU }" "У" :string) 49 | (merge-rule "\IeC {\CYRUSHRT }" "Ў" :string) 50 | (merge-rule "\IeC {\CYRV }" "В" :string) 51 | (merge-rule "\IeC {\CYRYA }" "Я" :string) 52 | (merge-rule "\IeC {\CYRYI }" "Ї" :string) 53 | (merge-rule "\IeC {\CYRYO }" "Ё" :string) 54 | (merge-rule "\IeC {\CYRYU }" "Ю" :string) 55 | (merge-rule "\IeC {\CYRZ }" "З" :string) 56 | (merge-rule "\IeC {\CYRZH }" "Ж" :string) 57 | (merge-rule "\IeC {\cyra }" "а" :string) 58 | (merge-rule "\IeC {\cyrb }" "б" :string) 59 | (merge-rule "\IeC {\cyrc }" "ц" :string) 60 | (merge-rule "\IeC {\cyrch }" "ч" :string) 61 | (merge-rule "\IeC {\cyrd }" "д" :string) 62 | (merge-rule "\IeC {\cyrdje }" "ђ" :string) 63 | (merge-rule "\IeC {\cyrdze }" "ѕ" :string) 64 | (merge-rule "\IeC {\cyrdzhe }" "џ" :string) 65 | (merge-rule "\IeC {\cyre }" "е" :string) 66 | (merge-rule "\IeC {\cyrerev }" "э" :string) 67 | (merge-rule "\IeC {\cyrery }" "ы" :string) 68 | (merge-rule "\IeC {\cyrf }" "ф" :string) 69 | (merge-rule "\IeC {\cyrg }" "г" :string) 70 | (merge-rule "\IeC {\cyrgup }" "ґ" :string) 71 | (merge-rule "\IeC {\cyrh }" "х" :string) 72 | (merge-rule "\IeC {\cyrhrdsn }" "ъ" :string) 73 | (merge-rule "\IeC {\cyri }" "и" :string) 74 | (merge-rule "\IeC {\cyrie }" "є" :string) 75 | (merge-rule "\IeC {\cyrii }" "і" :string) 76 | (merge-rule "\IeC {\cyrishrt }" "й" :string) 77 | (merge-rule "\IeC {\cyrje }" "ј" :string) 78 | (merge-rule "\IeC {\cyrk }" "к" :string) 79 | (merge-rule "\IeC {\cyrl }" "л" :string) 80 | (merge-rule "\IeC {\cyrlje }" "љ" :string) 81 | (merge-rule "\IeC {\cyrm }" "м" :string) 82 | (merge-rule "\IeC {\cyrn }" "н" :string) 83 | (merge-rule "\IeC {\cyrnje }" "њ" :string) 84 | (merge-rule "\IeC {\cyro }" "о" :string) 85 | (merge-rule "\IeC {\cyrp }" "п" :string) 86 | (merge-rule "\IeC {\cyrr }" "р" :string) 87 | (merge-rule "\IeC {\cyrs }" "с" :string) 88 | (merge-rule "\IeC {\cyrsftsn }" "ь" :string) 89 | (merge-rule "\IeC {\cyrsh }" "ш" :string) 90 | (merge-rule "\IeC {\cyrshch }" "щ" :string) 91 | (merge-rule "\IeC {\cyrt }" "т" :string) 92 | (merge-rule "\IeC {\cyrtshe }" "ћ" :string) 93 | (merge-rule "\IeC {\cyru }" "у" :string) 94 | (merge-rule "\IeC {\cyrushrt }" "ў" :string) 95 | (merge-rule "\IeC {\cyrv }" "в" :string) 96 | (merge-rule "\IeC {\cyrya }" "я" :string) 97 | (merge-rule "\IeC {\cyryi }" "ї" :string) 98 | (merge-rule "\IeC {\cyryo }" "ё" :string) 99 | (merge-rule "\IeC {\cyryu }" "ю" :string) 100 | (merge-rule "\IeC {\cyrz }" "з" :string) 101 | (merge-rule "\IeC {\cyrzh }" "ж" :string) 102 | -------------------------------------------------------------------------------- /docs/build/latex/LatinRules.xdy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/latex/LatinRules.xdy -------------------------------------------------------------------------------- /docs/build/latex/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx LaTeX output 2 | 3 | ALLDOCS = $(basename $(wildcard *.tex)) 4 | ALLPDF = $(addsuffix .pdf,$(ALLDOCS)) 5 | ALLDVI = $(addsuffix .dvi,$(ALLDOCS)) 6 | ALLXDV = 7 | ALLPS = $(addsuffix .ps,$(ALLDOCS)) 8 | 9 | # Prefix for archive names 10 | ARCHIVEPREFIX = 11 | # Additional LaTeX options (passed via variables in latexmkrc/latexmkjarc file) 12 | export LATEXOPTS ?= 13 | # Additional latexmk options 14 | LATEXMKOPTS ?= 15 | # format: pdf or dvi (used only by archive targets) 16 | FMT = pdf 17 | 18 | LATEX = latexmk -dvi 19 | PDFLATEX = latexmk -pdf -dvi- -ps- 20 | 21 | 22 | %.dvi: %.tex FORCE_MAKE 23 | $(LATEX) $(LATEXMKOPTS) '$<' 24 | 25 | %.ps: %.dvi 26 | dvips '$<' 27 | 28 | %.pdf: %.tex FORCE_MAKE 29 | $(PDFLATEX) $(LATEXMKOPTS) '$<' 30 | 31 | all: $(ALLPDF) 32 | 33 | all-dvi: $(ALLDVI) 34 | 35 | all-ps: $(ALLPS) 36 | 37 | all-pdf: $(ALLPDF) 38 | 39 | zip: all-$(FMT) 40 | mkdir $(ARCHIVEPREFIX)docs-$(FMT) 41 | cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT) 42 | zip -q -r -9 $(ARCHIVEPREFIX)docs-$(FMT).zip $(ARCHIVEPREFIX)docs-$(FMT) 43 | rm -r $(ARCHIVEPREFIX)docs-$(FMT) 44 | 45 | tar: all-$(FMT) 46 | mkdir $(ARCHIVEPREFIX)docs-$(FMT) 47 | cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT) 48 | tar cf $(ARCHIVEPREFIX)docs-$(FMT).tar $(ARCHIVEPREFIX)docs-$(FMT) 49 | rm -r $(ARCHIVEPREFIX)docs-$(FMT) 50 | 51 | gz: tar 52 | gzip -9 < $(ARCHIVEPREFIX)docs-$(FMT).tar > $(ARCHIVEPREFIX)docs-$(FMT).tar.gz 53 | 54 | bz2: tar 55 | bzip2 -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar 56 | 57 | xz: tar 58 | xz -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar 59 | 60 | clean: 61 | rm -f *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ps *.tar *.tar.gz *.tar.bz2 *.tar.xz $(ALLPDF) $(ALLDVI) $(ALLXDV) *.fls *.fdb_latexmk 62 | 63 | .PHONY: all all-pdf all-dvi all-ps clean zip tar gz bz2 xz 64 | .PHONY: FORCE_MAKE -------------------------------------------------------------------------------- /docs/build/latex/data_fitting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/build/latex/data_fitting.png -------------------------------------------------------------------------------- /docs/build/latex/latexmkjarc: -------------------------------------------------------------------------------- 1 | $latex = 'pdflatex ' . $ENV{'LATEXOPTS'} . ' -kanji=utf8 %O %S'; 2 | $dvipdf = 'dvipdfmx %O -o %D %S'; 3 | $makeindex = 'internal mendex %S %B %D'; 4 | sub mendex { 5 | my ($source, $basename, $destination) = @_; 6 | my $dictfile = $basename . ".dic"; 7 | unlink($destination); 8 | system("mendex", "-U", "-f", "-d", $dictfile, "-s", "python.ist", $source); 9 | if ($? > 0) { 10 | print("mendex exited with error code $? (ignored)\n"); 11 | } 12 | if (!-e $destination) { 13 | # create an empty .ind file if nothing 14 | open(FH, ">" . $destination); 15 | close(FH); 16 | } 17 | return 0; 18 | } 19 | add_cus_dep( "glo", "gls", 0, "makeglo" ); 20 | sub makeglo { 21 | return system( "mendex -J -f -s gglo.ist -o '$_[0].gls' '$_[0].glo'" ); 22 | } -------------------------------------------------------------------------------- /docs/build/latex/latexmkrc: -------------------------------------------------------------------------------- 1 | $latex = 'latex ' . $ENV{'LATEXOPTS'} . ' %O %S'; 2 | $pdflatex = 'pdflatex ' . $ENV{'LATEXOPTS'} . ' %O %S'; 3 | $lualatex = 'lualatex ' . $ENV{'LATEXOPTS'} . ' %O %S'; 4 | $xelatex = 'xelatex --no-pdf ' . $ENV{'LATEXOPTS'} . ' %O %S'; 5 | $makeindex = 'makeindex -s python.ist %O -o %D %S'; 6 | add_cus_dep( "glo", "gls", 0, "makeglo" ); 7 | sub makeglo { 8 | return system( "makeindex -s gglo.ist -o '$_[0].gls' '$_[0].glo'" ); 9 | } -------------------------------------------------------------------------------- /docs/build/latex/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | pushd %~dp0 6 | 7 | set PDFLATEX=latexmk -pdf -dvi- -ps- 8 | 9 | set "LATEXOPTS= " 10 | 11 | if "%1" == "" goto all-pdf 12 | 13 | if "%1" == "all-pdf" ( 14 | :all-pdf 15 | for %%i in (*.tex) do ( 16 | %PDFLATEX% %LATEXMKOPTS% %%i 17 | ) 18 | goto end 19 | ) 20 | 21 | if "%1" == "all-pdf-ja" ( 22 | goto all-pdf 23 | ) 24 | 25 | if "%1" == "clean" ( 26 | del /q /s *.dvi *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ps *.tar *.tar.gz *.tar.bz2 *.tar.xz *.fls *.fdb_latexmk 27 | goto end 28 | ) 29 | 30 | :end 31 | popd -------------------------------------------------------------------------------- /docs/build/latex/python.ist: -------------------------------------------------------------------------------- 1 | line_max 100 2 | headings_flag 1 3 | heading_prefix " \\bigletter " 4 | 5 | preamble "\\begin{sphinxtheindex} 6 | \\let\\bigletter\\sphinxstyleindexlettergroup 7 | \\let\\spxpagem \\sphinxstyleindexpagemain 8 | \\let\\spxentry \\sphinxstyleindexentry 9 | \\let\\spxextra \\sphinxstyleindexextra 10 | 11 | " 12 | 13 | postamble "\n\n\\end{sphinxtheindex}\n" 14 | 15 | symhead_positive "{\\sphinxsymbolsname}" 16 | numhead_positive "{\\sphinxnumbersname}" 17 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxcyrillic.sty: -------------------------------------------------------------------------------- 1 | %% CYRILLIC IN NON-CYRILLIC DOCUMENTS (pdflatex only) 2 | % 3 | % refs: https://tex.stackexchange.com/q/460271/ 4 | \ProvidesPackage{sphinxcyrillic}% 5 | [2018/11/21 v2.0 support for Cyrillic in non-Cyrillic documents] 6 | \RequirePackage{kvoptions} 7 | \SetupKeyvalOptions{prefix=spx@cyropt@} % use \spx@cyropt@ prefix 8 | \DeclareBoolOption[false]{Xtwo} 9 | \DeclareBoolOption[false]{TtwoA} 10 | \DeclareDefaultOption{\@unknownoptionerror} 11 | \ProcessLocalKeyvalOptions* % ignore class options 12 | 13 | \ifspx@cyropt@Xtwo 14 | % original code by tex.sx user egreg (updated 2019/10/28): 15 | % https://tex.stackexchange.com/a/460325/ 16 | % 159 Cyrillic glyphs as available in X2 TeX 8bit font encoding 17 | % This assumes inputenc loaded with utf8 option, or LaTeX release 18 | % as recent as 2018/04/01 which does it automatically. 19 | \@tfor\next:=% 20 | {Ё}{Ђ}{Є}{Ѕ}{І}{Ј}{Љ}{Њ}{Ћ}{Ў}{Џ}{А}{Б}{В}{Г}{Д}{Е}{Ж}{З}{И}{Й}% 21 | {К}{Л}{М}{Н}{О}{П}{Р}{С}{Т}{У}{Ф}{Х}{Ц}{Ч}{Ш}{Щ}{Ъ}{Ы}{Ь}{Э}{Ю}% 22 | {Я}{а}{б}{в}{г}{д}{е}{ж}{з}{и}{й}{к}{л}{м}{н}{о}{п}{р}{с}{т}{у}% 23 | {ф}{х}{ц}{ч}{ш}{щ}{ъ}{ы}{ь}{э}{ю}{я}{ё}{ђ}{є}{ѕ}{і}{ј}{љ}{њ}{ћ}% 24 | {ў}{џ}{Ѣ}{ѣ}{Ѫ}{ѫ}{Ѵ}{ѵ}{Ґ}{ґ}{Ғ}{ғ}{Ҕ}{ҕ}{Җ}{җ}{Ҙ}{ҙ}{Қ}{қ}{Ҝ}{ҝ}% 25 | {Ҟ}{ҟ}{Ҡ}{ҡ}{Ң}{ң}{Ҥ}{ҥ}{Ҧ}{ҧ}{Ҩ}{ҩ}{Ҫ}{ҫ}{Ҭ}{ҭ}{Ү}{ү}{Ұ}{ұ}{Ҳ}{ҳ}% 26 | {Ҵ}{ҵ}{Ҷ}{ҷ}{Ҹ}{ҹ}{Һ}{һ}{Ҽ}{ҽ}{Ҿ}{ҿ}{Ӏ}{Ӄ}{ӄ}{Ӆ}{ӆ}{Ӈ}{ӈ}{Ӌ}{ӌ}% 27 | {Ӎ}{ӎ}{Ӕ}{ӕ}{Ә}{ә}{Ӡ}{ӡ}{Ө}{ө}\do 28 | {% 29 | \begingroup\def\IeC{\protect\DeclareTextSymbolDefault}% 30 | \protected@edef\@temp{\endgroup 31 | \@ifl@t@r{\fmtversion}{2019/10/01}{\csname u8:\next\endcsname}{\next}}% 32 | \@temp{X2}% 33 | }% 34 | \else 35 | \ifspx@cyropt@TtwoA 36 | % original code by tex.sx user jfbu: 37 | % https://tex.stackexchange.com/a/460305/ 38 | % 63*2+1=127 Cyrillic glyphs as found in T2A 8bit TeX font-encoding 39 | \@tfor\@tempa:=% 40 | {ae}{a}{b}{chrdsc}{chvcrs}{ch}{c}{dje}{dze}{dzhe}{d}{erev}{ery}{e}% 41 | {f}{ghcrs}{gup}{g}{hdsc}{hrdsn}{h}{ie}{ii}{ishrt}{i}{je}% 42 | {kbeak}{kdsc}{kvcrs}{k}{lje}{l}{m}{ndsc}{ng}{nje}{n}{otld}{o}{p}{r}% 43 | {schwa}{sdsc}{sftsn}{shch}{shha}{sh}{s}{tshe}{t}{ushrt}{u}{v}% 44 | {ya}{yhcrs}{yi}{yo}{yu}{y}{zdsc}{zhdsc}{zh}{z}\do 45 | {% 46 | \expandafter\DeclareTextSymbolDefault\expandafter 47 | {\csname cyr\@tempa\endcsname}{T2A}% 48 | \expandafter\uppercase\expandafter{\expandafter 49 | \def\expandafter\@tempa\expandafter{\@tempa}}% 50 | \expandafter\DeclareTextSymbolDefault\expandafter 51 | {\csname CYR\@tempa\endcsname}{T2A}% 52 | }% 53 | \DeclareTextSymbolDefault{\CYRpalochka}{T2A}% 54 | \fi\fi 55 | \endinput 56 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxhowto.cls: -------------------------------------------------------------------------------- 1 | % 2 | % sphinxhowto.cls for Sphinx (https://www.sphinx-doc.org/) 3 | % 4 | 5 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 6 | \ProvidesClass{sphinxhowto}[2019/12/01 v2.3.0 Document class (Sphinx howto)] 7 | 8 | % 'oneside' option overriding the 'twoside' default 9 | \newif\if@oneside 10 | \DeclareOption{oneside}{\@onesidetrue} 11 | % Pass remaining document options to the parent class. 12 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\sphinxdocclass}} 13 | \ProcessOptions\relax 14 | 15 | % Default to two-side document 16 | \if@oneside 17 | % nothing to do (oneside is the default) 18 | \else 19 | \PassOptionsToClass{twoside}{\sphinxdocclass} 20 | \fi 21 | 22 | \LoadClass{\sphinxdocclass} 23 | 24 | % Set some sane defaults for section numbering depth and TOC depth. You can 25 | % reset these counters in your preamble. 26 | % 27 | \setcounter{secnumdepth}{2} 28 | \setcounter{tocdepth}{2}% i.e. section and subsection 29 | 30 | % Adapt \and command to the flushright context of \sphinxmaketitle, to 31 | % avoid ragged line endings if author names do not fit all on one single line 32 | \DeclareRobustCommand{\and}{% 33 | \end{tabular}\kern-\tabcolsep 34 | \allowbreak 35 | \hskip\dimexpr1em+\tabcolsep\@plus.17fil\begin{tabular}[t]{c}% 36 | }% 37 | % If it is desired that each author name be on its own line, use in preamble: 38 | %\DeclareRobustCommand{\and}{% 39 | % \end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}% 40 | %}% 41 | % Change the title page to look a bit better, and fit in with the fncychap 42 | % ``Bjarne'' style a bit better. 43 | % 44 | \newcommand{\sphinxmaketitle}{% 45 | \noindent\rule{\linewidth}{1pt}\par 46 | \begingroup % for PDF information dictionary 47 | \def\endgraf{ }\def\and{\& }% 48 | \pdfstringdefDisableCommands{\def\\{, }}% overwrite hyperref setup 49 | \hypersetup{pdfauthor={\@author}, pdftitle={\@title}}% 50 | \endgroup 51 | \begin{flushright} 52 | \sphinxlogo 53 | \py@HeaderFamily 54 | {\Huge \@title }\par 55 | {\itshape\large \py@release \releaseinfo}\par 56 | \vspace{25pt} 57 | {\Large 58 | \begin{tabular}[t]{c} 59 | \@author 60 | \end{tabular}\kern-\tabcolsep}\par 61 | \vspace{25pt} 62 | \@date \par 63 | \py@authoraddress \par 64 | \end{flushright} 65 | \@thanks 66 | \setcounter{footnote}{0} 67 | \let\thanks\relax\let\maketitle\relax 68 | %\gdef\@thanks{}\gdef\@author{}\gdef\@title{} 69 | } 70 | 71 | \newcommand{\sphinxtableofcontents}{% 72 | \begingroup 73 | \parskip \z@skip 74 | \sphinxtableofcontentshook 75 | \tableofcontents 76 | \endgroup 77 | \noindent\rule{\linewidth}{1pt}\par 78 | \vspace{12pt}% 79 | } 80 | \newcommand\sphinxtableofcontentshook{} 81 | \pagenumbering{arabic} 82 | 83 | % Fix the bibliography environment to add an entry to the Table of 84 | % Contents. 85 | % For an article document class this environment is a section, 86 | % so no page break before it. 87 | % 88 | \newenvironment{sphinxthebibliography}[1]{% 89 | % \phantomsection % not needed here since TeXLive 2010's hyperref 90 | \begin{thebibliography}{#1}% 91 | \addcontentsline{toc}{section}{\ifdefined\refname\refname\else\ifdefined\bibname\bibname\fi\fi}}{\end{thebibliography}} 92 | 93 | 94 | % Same for the indices. 95 | % The memoir class already does this, so we don't duplicate it in that case. 96 | % 97 | \@ifclassloaded{memoir} 98 | {\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}} 99 | {\newenvironment{sphinxtheindex}{% 100 | \phantomsection % needed because no chapter, section, ... is created by theindex 101 | \begin{theindex}% 102 | \addcontentsline{toc}{section}{\indexname}}{\end{theindex}}} 103 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxlatexcontainers.sty: -------------------------------------------------------------------------------- 1 | %% CONTAINER DIRECTIVES 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxlatexcontainers.sty}[2021/05/03 containers] 5 | 6 | % The purpose of this file is to provide a dummy environment sphinxclass which 7 | % will be inserted for each class in each container directive. The class name 8 | % will be passed as the argument to the environment. 9 | % 10 | % For a class foo, the user can define customised handling of that class by 11 | % defining the sphinxclassfoo LaTeX environment. 12 | 13 | \newenvironment{sphinxuseclass}[1]{% 14 | \def\sphinxClassFunctionName{sphinxclass#1}% 15 | \ltx@ifundefined{\sphinxClassFunctionName}% 16 | {}% undefined so do nothing 17 | {\expandafter\begin\expandafter{\sphinxClassFunctionName}}% 18 | }{% 19 | \ltx@ifundefined{\sphinxClassFunctionName}% 20 | {}% we did nothing so we keep doing nothing 21 | {\expandafter\end\expandafter{\sphinxClassFunctionName}}% 22 | }% 23 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxlatexgraphics.sty: -------------------------------------------------------------------------------- 1 | %% GRAPHICS 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxlatexgraphics.sty}[2021/01/27 graphics] 5 | 6 | % Provides support for this output mark-up from Sphinx latex writer: 7 | % 8 | % - macros: 9 | % 10 | % - \sphinxfigcaption 11 | % - \sphinxincludegraphics 12 | % 13 | % - environments: 14 | % 15 | % - sphinxfigure-in-table 16 | % 17 | % May change: 18 | % 19 | % - \sphinxcaption (at begin document) 20 | % 21 | % Also provides: 22 | % 23 | % - \sphinxsafeincludegraphics (default of \sphinxincludegraphics since 2.0) 24 | % - \spx@image@maxheight dimension (used by sphinxlatexadmonitions.sty) 25 | % - \spx@image@box scratch box register (also used by sphinxlatexliterals.sty) 26 | % 27 | % Requires: 28 | % \RequirePackage{graphicx}% done in sphinx.sty 29 | \RequirePackage{amstext}% needed for \firstchoice@true(false) 30 | 31 | % \sphinxincludegraphics resizes images larger than the TeX \linewidth (which 32 | % is adjusted in indented environments), or taller than a certain maximal 33 | % height (usually \textheight and this is reduced in the environments which use 34 | % framed.sty to avoid infinite loop if image too tall). 35 | % 36 | % In case height or width options are present the rescaling is done 37 | % (since 2.0), in a way keeping the width:height ratio either native from 38 | % image or from the width and height options if both were present. 39 | % 40 | \newdimen\spx@image@maxheight 41 | \AtBeginDocument{\spx@image@maxheight\textheight} 42 | 43 | % box scratch register 44 | \newbox\spx@image@box 45 | \newcommand*{\sphinxsafeincludegraphics}[2][]{% 46 | % #1 contains possibly width=, height=, but no scale= since 1.8.4 47 | \setbox\spx@image@box\hbox{\includegraphics[#1,draft]{#2}}% 48 | \in@false % use some handy boolean flag 49 | \ifdim \wd\spx@image@box>\linewidth 50 | \in@true % flag to remember to adjust options and set box dimensions 51 | % compute height which results from rescaling width to \linewidth 52 | % and keep current aspect ratio. multiply-divide in \numexpr uses 53 | % temporarily doubled precision, hence no overflow. (of course we 54 | % assume \ht is not a few sp's below \maxdimen...(about 16384pt). 55 | \edef\spx@image@rescaledheight % with sp units 56 | {\the\numexpr\ht\spx@image@box 57 | *\linewidth/\wd\spx@image@box sp}% 58 | \ifdim\spx@image@rescaledheight>\spx@image@maxheight 59 | % the rescaled height will be too big, so it is height which decides 60 | % the rescaling factor 61 | \def\spx@image@requiredheight{\spx@image@maxheight}% dimen register 62 | \edef\spx@image@requiredwidth % with sp units 63 | {\the\numexpr\wd\spx@image@box 64 | *\spx@image@maxheight/\ht\spx@image@box sp}% 65 | % TODO: decide if this commented-out block could be needed due to 66 | % rounding in numexpr operations going up 67 | % \ifdim\spx@image@requiredwidth>\linewidth 68 | % \def\spx@image@requiredwidth{\linewidth}% dimen register 69 | % \fi 70 | \else 71 | \def\spx@image@requiredwidth{\linewidth}% dimen register 72 | \let\spx@image@requiredheight\spx@image@rescaledheight% sp units 73 | \fi 74 | \else 75 | % width is ok, let's check height 76 | \ifdim\ht\spx@image@box>\spx@image@maxheight 77 | \in@true 78 | \edef\spx@image@requiredwidth % with sp units 79 | {\the\numexpr\wd\spx@image@box 80 | *\spx@image@maxheight/\ht\spx@image@box sp}% 81 | \def\spx@image@requiredheight{\spx@image@maxheight}% dimen register 82 | \fi 83 | \fi % end of check of width and height 84 | \ifin@ 85 | \setbox\spx@image@box 86 | \hbox{\includegraphics 87 | [%#1,% contained only width and/or height and overruled anyhow 88 | width=\spx@image@requiredwidth,height=\spx@image@requiredheight]% 89 | {#2}}% 90 | % \includegraphics does not set box dimensions to the exactly 91 | % requested ones, see https://github.com/latex3/latex2e/issues/112 92 | \wd\spx@image@box\spx@image@requiredwidth 93 | \ht\spx@image@box\spx@image@requiredheight 94 | \leavevmode\box\spx@image@box 95 | \else 96 | % here we do not modify the options, no need to adjust width and height 97 | % on output, they will be computed exactly as with "draft" option 98 | \setbox\spx@image@box\box\voidb@x % clear memory 99 | \includegraphics[#1]{#2}% 100 | \fi 101 | }% 102 | % Use the "safe" one by default (2.0) 103 | \def\sphinxincludegraphics{\sphinxsafeincludegraphics} 104 | 105 | 106 | %% FIGURE IN TABLE 107 | % 108 | \newenvironment{sphinxfigure-in-table}[1][\linewidth]{% 109 | \def\@captype{figure}% 110 | \sphinxsetvskipsforfigintablecaption 111 | \begin{minipage}{#1}% 112 | }{\end{minipage}} 113 | % tabulary expands twice contents, we need to prevent double counter stepping 114 | \newcommand*\sphinxfigcaption 115 | {\ifx\equation$%$% this is trick to identify tabulary first pass 116 | \firstchoice@false\else\firstchoice@true\fi 117 | \spx@originalcaption } 118 | \newcommand*\sphinxsetvskipsforfigintablecaption 119 | {\abovecaptionskip\smallskipamount 120 | \belowcaptionskip\smallskipamount} 121 | 122 | \endinput 123 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxlatexindbibtoc.sty: -------------------------------------------------------------------------------- 1 | %% INDEX, BIBLIOGRAPHY, APPENDIX, TABLE OF CONTENTS 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxlatexindbibtoc.sty}[2021/01/27 index, bib., toc] 5 | 6 | % Provides support for this output mark-up from Sphinx latex writer: 7 | % 8 | % - environments: (backup defaults or get redefined) 9 | % 10 | % - sphinxtheindex (direct mark-up or via python.ist or sphinx.xdy) 11 | % - sphinxthebibliography 12 | % 13 | % - macros: (defines defaults) 14 | % 15 | % - \sphinxmaketitle 16 | % - \sphinxtableofcontents 17 | % - \sphinxnonalphabeticalgroupname 18 | % - \sphinxsymbolsname 19 | % - \sphinxnumbersname 20 | % - \sphinxcite 21 | % 22 | % Requires: 23 | \RequirePackage{makeidx} 24 | 25 | % fix the double index and bibliography on the table of contents 26 | % in jsclasses (Japanese standard document classes) 27 | \ifx\@jsc@uplatextrue\@undefined\else 28 | \renewenvironment{sphinxtheindex} 29 | {\cleardoublepage\phantomsection 30 | \begin{theindex}} 31 | {\end{theindex}} 32 | 33 | \renewenvironment{sphinxthebibliography}[1] 34 | {\cleardoublepage% \phantomsection % not needed here since TeXLive 2010's hyperref 35 | \begin{thebibliography}{#1}} 36 | {\end{thebibliography}} 37 | \fi 38 | 39 | % disable \@chappos in Appendix in pTeX 40 | \ifx\kanjiskip\@undefined\else 41 | \let\py@OldAppendix=\appendix 42 | \renewcommand{\appendix}{ 43 | \py@OldAppendix 44 | \gdef\@chappos{} 45 | } 46 | \fi 47 | 48 | % make commands known to non-Sphinx document classes 49 | \providecommand*{\sphinxmaketitle}{\maketitle} 50 | \providecommand*{\sphinxtableofcontents}{\tableofcontents} 51 | \ltx@ifundefined{sphinxthebibliography} 52 | {\newenvironment 53 | {sphinxthebibliography}{\begin{thebibliography}}{\end{thebibliography}}% 54 | } 55 | {}% else clause of \ltx@ifundefined 56 | \ltx@ifundefined{sphinxtheindex} 57 | {\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}}% 58 | {}% else clause of \ltx@ifundefined 59 | 60 | % for usage with xindy: this string gets internationalized in preamble 61 | \newcommand*{\sphinxnonalphabeticalgroupname}{} 62 | % redefined in preamble, headings for makeindex produced index 63 | \newcommand*{\sphinxsymbolsname}{} 64 | \newcommand*{\sphinxnumbersname}{} 65 | 66 | \protected\def\sphinxcite{\cite} 67 | 68 | 69 | \endinput 70 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxlatexlists.sty: -------------------------------------------------------------------------------- 1 | %% ALPHANUMERIC LIST ITEMS 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxlatexlists.sty}[2021/12/20 lists] 5 | 6 | % Provides support for this output mark-up from Sphinx latex writer: 7 | % - \sphinxsetlistlabels 8 | % - \sphinxlineitem 9 | % and for the maxlistdepth key of sphinxsetup 10 | % Dependencies: the \spx@opt@maxlistdepth from sphinx.sty 11 | 12 | % We need some helpers macros 13 | \newtoks\spx@lineitemlabel 14 | \long\def\sphinx@gobto@sphinxlineitem#1\sphinxlineitem{} 15 | % TeX/LaTeX has no (easy to use) built-in "peek-ahead" mechanism, but 16 | % we would like to know if next token is another \sphinxlineitem (this 17 | % can happen in glossary entries with multiple terms for same definition) 18 | % so we simply grab next token (assuming it is not {tokens} originally) 19 | \newcommand\sphinxlineitem[2]{% 20 | % safe test of whether #2 is \sphinxlineitem 21 | \sphinx@gobto@sphinxlineitem#2\@gobbletwo\sphinxlineitem\unless 22 | \iftrue 23 | % case with sphinxlineitem immediately followed by another \sphinxlineitem: 24 | % accumulate successive terms until actual definition or sub-list is found 25 | \spx@lineitemlabel\expandafter{\the\spx@lineitemlabel\strut#1\\}% 26 | \else 27 | % now issue the \item command with possibly multi-line contents 28 | % these weird incantations with \kern are related to how LaTeX 29 | % handles \item generally 30 | \item[\kern\labelwidth\kern-\itemindent\kern-\leftmargin 31 | {\parbox[t]{\dimexpr\linewidth+\leftmargin\relax}{% 32 | \raggedright 33 | \the\spx@lineitemlabel% accumulated terms before this one, CR separated 34 | \strut#1}}% due to LaTeX internals no \par token allowed here, 35 | % but the \parbox will insert one tacitly at end 36 | \kern-\labelsep]% 37 | \spx@lineitemlabel{}% 38 | % this causes the label to be typeset (filling up the line), clearing up 39 | % things in case a nested list follows. 40 | \leavevmode 41 | \fi #2% 42 | }% 43 | 44 | 45 | \newcommand\sphinxsetlistlabels[5] 46 | {% #1 = style, #2 = enum, #3 = enumnext, #4 = prefix, #5 = suffix 47 | % #2 and #3 are counters used by enumerate environment e.g. enumi, enumii. 48 | % #1 is a macro such as \arabic or \alph 49 | % prefix and suffix are strings (by default empty and a dot). 50 | \@namedef{the#2}{#1{#2}}% 51 | \@namedef{label#2}{#4\@nameuse{the#2}#5}% 52 | \@namedef{p@#3}{\@nameuse{p@#2}#4\@nameuse{the#2}#5}% 53 | }% 54 | 55 | 56 | %% MAXLISTDEPTH 57 | % 58 | % remove LaTeX's cap on nesting depth if 'maxlistdepth' key used. 59 | % This is a hack, which works with the standard classes: it assumes \@toodeep 60 | % is always used in "true" branches: "\if ... \@toodeep \else .. \fi." 61 | 62 | % will force use the "false" branch (if there is one) 63 | \def\spx@toodeep@hack{\fi\iffalse} 64 | 65 | % do nothing if 'maxlistdepth' key not used or if package enumitem loaded. 66 | \ifnum\spx@opt@maxlistdepth=\z@\expandafter\@gobbletwo\fi 67 | \AtBeginDocument{% 68 | \@ifpackageloaded{enumitem}{\remove@to@nnil}{}% 69 | \let\spx@toodeepORI\@toodeep 70 | \def\@toodeep{% 71 | \ifnum\@listdepth<\spx@opt@maxlistdepth\relax 72 | \expandafter\spx@toodeep@hack 73 | \else 74 | \expandafter\spx@toodeepORI 75 | \fi}% 76 | % define all missing \@list... macros 77 | \count@\@ne 78 | \loop 79 | \ltx@ifundefined{@list\romannumeral\the\count@} 80 | {\iffalse}{\iftrue\advance\count@\@ne}% 81 | \repeat 82 | \loop 83 | \ifnum\count@>\spx@opt@maxlistdepth\relax\else 84 | \expandafter\let 85 | \csname @list\romannumeral\the\count@\expandafter\endcsname 86 | \csname @list\romannumeral\the\numexpr\count@-\@ne\endcsname 87 | % workaround 2.6--3.2d babel-french issue (fixed in 3.2e; no change needed) 88 | \ltx@ifundefined{leftmargin\romannumeral\the\count@} 89 | {\expandafter\let 90 | \csname leftmargin\romannumeral\the\count@\expandafter\endcsname 91 | \csname leftmargin\romannumeral\the\numexpr\count@-\@ne\endcsname}{}% 92 | \advance\count@\@ne 93 | \repeat 94 | % define all missing enum... counters and \labelenum... macros and \p@enum.. 95 | \count@\@ne 96 | \loop 97 | \ltx@ifundefined{c@enum\romannumeral\the\count@} 98 | {\iffalse}{\iftrue\advance\count@\@ne}% 99 | \repeat 100 | \loop 101 | \ifnum\count@>\spx@opt@maxlistdepth\relax\else 102 | \newcounter{enum\romannumeral\the\count@}% 103 | \expandafter\def 104 | \csname labelenum\romannumeral\the\count@\expandafter\endcsname 105 | \expandafter 106 | {\csname theenum\romannumeral\the\numexpr\count@\endcsname.}% 107 | \expandafter\def 108 | \csname p@enum\romannumeral\the\count@\expandafter\endcsname 109 | \expandafter 110 | {\csname p@enum\romannumeral\the\numexpr\count@-\@ne\expandafter 111 | \endcsname\csname theenum\romannumeral\the\numexpr\count@-\@ne\endcsname.}% 112 | \advance\count@\@ne 113 | \repeat 114 | % define all missing labelitem... macros 115 | \count@\@ne 116 | \loop 117 | \ltx@ifundefined{labelitem\romannumeral\the\count@} 118 | {\iffalse}{\iftrue\advance\count@\@ne}% 119 | \repeat 120 | \loop 121 | \ifnum\count@>\spx@opt@maxlistdepth\relax\else 122 | \expandafter\let 123 | \csname labelitem\romannumeral\the\count@\expandafter\endcsname 124 | \csname labelitem\romannumeral\the\numexpr\count@-\@ne\endcsname 125 | \advance\count@\@ne 126 | \repeat 127 | \PackageInfo{sphinx}{maximal list depth extended to \spx@opt@maxlistdepth}% 128 | \@gobble\@nnil 129 | } 130 | 131 | \endinput 132 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxlatexnumfig.sty: -------------------------------------------------------------------------------- 1 | %% NUMBERING OF FIGURES, TABLES, AND LITERAL BLOCKS 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxlatexnumfig.sty}[2021/01/27 numbering] 5 | 6 | % Requires: remreset (old LaTeX only) 7 | % relates to numfig and numfig_secnum_depth configuration variables 8 | 9 | % LaTeX 2018-04-01 and later provides \@removefromreset 10 | \ltx@ifundefined{@removefromreset} 11 | {\RequirePackage{remreset}} 12 | {}% avoid warning 13 | % Everything is delayed to \begin{document} to allow hyperref patches into 14 | % \newcounter to solve duplicate label problems for internal hyperlinks to 15 | % code listings (literalblock counter). User or extension re-definitions of 16 | % \theliteralblock, et al., thus have also to be delayed. (changed at 3.5.0) 17 | \AtBeginDocument{% 18 | \ltx@ifundefined{c@chapter} 19 | {\newcounter{literalblock}}% 20 | {\newcounter{literalblock}[chapter]% 21 | \def\theliteralblock{\ifnum\c@chapter>\z@\arabic{chapter}.\fi 22 | \arabic{literalblock}}% 23 | }% 24 | \ifspx@opt@nonumfigreset 25 | \ltx@ifundefined{c@chapter}{}{% 26 | \@removefromreset{figure}{chapter}% 27 | \@removefromreset{table}{chapter}% 28 | \@removefromreset{literalblock}{chapter}% 29 | \ifspx@opt@mathnumfig 30 | \@removefromreset{equation}{chapter}% 31 | \fi 32 | }% 33 | \def\thefigure{\arabic{figure}}% 34 | \def\thetable {\arabic{table}}% 35 | \def\theliteralblock{\arabic{literalblock}}% 36 | \ifspx@opt@mathnumfig 37 | \def\theequation{\arabic{equation}}% 38 | \fi 39 | \else 40 | \let\spx@preAthefigure\@empty 41 | \let\spx@preBthefigure\@empty 42 | % \ifspx@opt@usespart % <-- LaTeX writer could pass such a 'usespart' boolean 43 | % % as sphinx.sty package option 44 | % If document uses \part, (triggered in Sphinx by latex_toplevel_sectioning) 45 | % LaTeX core per default does not reset chapter or section 46 | % counters at each part. 47 | % But if we modify this, we need to redefine \thechapter, \thesection to 48 | % include the part number and this will cause problems in table of contents 49 | % because of too wide numbering. Simplest is to do nothing. 50 | % \fi 51 | \ifnum\spx@opt@numfigreset>0 52 | \ltx@ifundefined{c@chapter} 53 | {} 54 | {\g@addto@macro\spx@preAthefigure{\ifnum\c@chapter>\z@\arabic{chapter}.}% 55 | \g@addto@macro\spx@preBthefigure{\fi}}% 56 | \fi 57 | \ifnum\spx@opt@numfigreset>1 58 | \@addtoreset{figure}{section}% 59 | \@addtoreset{table}{section}% 60 | \@addtoreset{literalblock}{section}% 61 | \ifspx@opt@mathnumfig 62 | \@addtoreset{equation}{section}% 63 | \fi% 64 | \g@addto@macro\spx@preAthefigure{\ifnum\c@section>\z@\arabic{section}.}% 65 | \g@addto@macro\spx@preBthefigure{\fi}% 66 | \fi 67 | \ifnum\spx@opt@numfigreset>2 68 | \@addtoreset{figure}{subsection}% 69 | \@addtoreset{table}{subsection}% 70 | \@addtoreset{literalblock}{subsection}% 71 | \ifspx@opt@mathnumfig 72 | \@addtoreset{equation}{subsection}% 73 | \fi% 74 | \g@addto@macro\spx@preAthefigure{\ifnum\c@subsection>\z@\arabic{subsection}.}% 75 | \g@addto@macro\spx@preBthefigure{\fi}% 76 | \fi 77 | \ifnum\spx@opt@numfigreset>3 78 | \@addtoreset{figure}{subsubsection}% 79 | \@addtoreset{table}{subsubsection}% 80 | \@addtoreset{literalblock}{subsubsection}% 81 | \ifspx@opt@mathnumfig 82 | \@addtoreset{equation}{subsubsection}% 83 | \fi% 84 | \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubsection>\z@\arabic{subsubsection}.}% 85 | \g@addto@macro\spx@preBthefigure{\fi}% 86 | \fi 87 | \ifnum\spx@opt@numfigreset>4 88 | \@addtoreset{figure}{paragraph}% 89 | \@addtoreset{table}{paragraph}% 90 | \@addtoreset{literalblock}{paragraph}% 91 | \ifspx@opt@mathnumfig 92 | \@addtoreset{equation}{paragraph}% 93 | \fi% 94 | \g@addto@macro\spx@preAthefigure{\ifnum\c@subparagraph>\z@\arabic{subparagraph}.}% 95 | \g@addto@macro\spx@preBthefigure{\fi}% 96 | \fi 97 | \ifnum\spx@opt@numfigreset>5 98 | \@addtoreset{figure}{subparagraph}% 99 | \@addtoreset{table}{subparagraph}% 100 | \@addtoreset{literalblock}{subparagraph}% 101 | \ifspx@opt@mathnumfig 102 | \@addtoreset{equation}{subparagraph}% 103 | \fi% 104 | \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubparagraph>\z@\arabic{subsubparagraph}.}% 105 | \g@addto@macro\spx@preBthefigure{\fi}% 106 | \fi 107 | \expandafter\g@addto@macro 108 | \expandafter\spx@preAthefigure\expandafter{\spx@preBthefigure}% 109 | \let\thefigure\spx@preAthefigure 110 | \let\thetable\spx@preAthefigure 111 | \let\theliteralblock\spx@preAthefigure 112 | \g@addto@macro\thefigure{\arabic{figure}}% 113 | \g@addto@macro\thetable{\arabic{table}}% 114 | \g@addto@macro\theliteralblock{\arabic{literalblock}}% 115 | \ifspx@opt@mathnumfig 116 | \let\theequation\spx@preAthefigure 117 | \g@addto@macro\theequation{\arabic{equation}}% 118 | \fi 119 | \fi 120 | }% end of big \AtBeginDocument 121 | 122 | \endinput 123 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxlatexshadowbox.sty: -------------------------------------------------------------------------------- 1 | %% TOPIC AND CONTENTS BOXES 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxlatexshadowbox.sty}[2023/03/19 sphinxShadowBox] 5 | 6 | % Provides support for this output mark-up from Sphinx latex writer: 7 | % 8 | % - sphinxShadowBox (environment) 9 | % 10 | % Dependencies (they do not need to be defined at time of loading): 11 | % 12 | % - of course the various colour and dimension options handled via sphinx.sty 13 | % - dimension register \spx@image@maxheight from sphinxlatexgraphics.sty 14 | % - \savenotes/\spewnotes from sphinxpackagefootnote 15 | % - \ifspx@inframed defined in sphinx.sty 16 | % 17 | % Requires: 18 | \RequirePackage{framed} 19 | \RequirePackage{sphinxpackageboxes} 20 | 21 | % At 5.1.0 the code formerly here in a definition of \spx@ShadowFBox has been 22 | % refactored to hand over to a more powerful \spx@boxes@fcolorbox provided by 23 | % file sphinxpackageboxes.sty, it can draw rounded corners and add a background 24 | % color. 25 | 26 | % At 6.2.0, \spx@ShadowFBox is so much simplified that it is now not 27 | % separately defined but directly incorporated into the \FrameCommand 28 | % definition done by sphinxShadowBox environment below. 29 | 30 | % Use framed.sty \MakeFramed/\endMakeFramed to allow page breaks for topic 31 | % boxes. Originally Sphinx used \shadowbox from fancybox.sty but it did not 32 | % allow pagebreaks (which was problematic for "contents" directive if there 33 | % are many subsections). 34 | % 35 | % Docutils does not allow topic to be nested within topics or other body 36 | % elements. But the LaTeX code here does allow it: 37 | % 38 | % - a topic inside another topic would be rendered in a minipage (thus not 39 | % allowing pagebreaks). Its external frame would adapt perfectly to 40 | % the *current (smaller) width for text*. 41 | % 42 | % - a topic inside (nested) lists or quote environments would have its frame 43 | % take the *full width* of the page, but its text contents on the other hand 44 | % would obey exactly the current indentation plus inner separation. This is 45 | % in contrast with the framing used for literal blocks, also based, but in a 46 | % more sophisticated way on usage of \MakeFramed/\endMakeFramed, and 47 | % adjusting to current text indentation. 48 | \newenvironment{sphinxShadowBox} 49 | {% 50 | \spx@boxes@fcolorbox@setup{topic}% 51 | % we will use the dimen registers from sphinxpackageboxes.sty which now hold 52 | % the values from options related to topic/contents 53 | % MEMO: \spx@boxes@fcolorbox creates an \hbox but does not quit vertical 54 | % mode; but in context of framed.sty's \FrameCommand TeX is already 55 | % in restricted horizontal mode, so no need for a \leavevmode here. 56 | \def\FrameCommand {\spx@boxes@fcolorbox}% 57 | % 6.2.0 adds support for div.topic_box-decoration-break=slice. 58 | % (it is yet undecided if slice style should inhibit a bottom shadow) 59 | \ifspx@topic@border@open 60 | \def\FirstFrameCommand 61 | {\spx@boxes@fcolorbox@setup@openbottom\FrameCommand}% 62 | \def\MidFrameCommand 63 | {\spx@boxes@fcolorbox@setup@openboth \FrameCommand}% 64 | \def\LastFrameCommand 65 | {\spx@boxes@fcolorbox@setup@opentop \FrameCommand}% 66 | \fi 67 | \advance\spx@image@maxheight 68 | -\dimexpr\spx@boxes@border@top+\spx@boxes@border@bottom 69 | +\spx@boxes@padding@top+\spx@boxes@padding@bottom 70 | +\ifdim\spx@boxes@shadow@yoffset<\z@-\fi\spx@boxes@shadow@yoffset 71 | +\baselineskip\relax 72 | % configure framed.sty not to add extra vertical spacing 73 | \ltx@ifundefined{OuterFrameSep}{}{\OuterFrameSep\z@skip}% 74 | % the \trivlist will add the vertical spacing on top and bottom which is 75 | % typical of center environment as used in Sphinx <= 1.4.1 76 | % the \noindent has the effet of an extra blank line on top, to 77 | % imitate closely the layout from Sphinx <= 1.4.1; the \FrameHeightAdjust 78 | % will put top part of frame on this baseline. 79 | \def\FrameHeightAdjust {\baselineskip}% 80 | % use package footnote to handle footnotes 81 | \savenotes 82 | \trivlist\item\noindent 83 | % use a minipage if we are already inside a framed environment 84 | \ifspx@inframed\begin{minipage}{\linewidth}\fi 85 | \MakeFramed {\spx@inframedtrue 86 | % framed.sty puts into "\width" the added width (padding+border widths) 87 | % adjust \hsize to what the contents must use 88 | \advance\hsize-\width 89 | % adjust LaTeX parameters to behave properly in indented/quoted contexts 90 | \FrameRestore 91 | % typeset the contents as in a minipage (Sphinx <= 1.4.1 used a minipage and 92 | % itemize/enumerate are therein typeset more tightly, we want to keep 93 | % that). We copy-paste from LaTeX source code but don't do a real minipage. 94 | \@pboxswfalse 95 | \let\@listdepth\@mplistdepth \@mplistdepth\z@ 96 | \@minipagerestore 97 | \@setminipage 98 | }% 99 | \color@begingroup % workaround upstream framed.sty bug 100 | \ifspx@topic@withtextcolor 101 | \color{sphinxtopicTextColor}% 102 | \fi 103 | \spx@topic@TeXextras 104 | }% 105 | {% insert the "endminipage" code 106 | \par\unskip 107 | \color@endgroup % matches the \color@begingroup 108 | \@minipagefalse 109 | \endMakeFramed 110 | \ifspx@inframed\end{minipage}\fi 111 | \endtrivlist 112 | % output the stored footnotes 113 | \spewnotes 114 | } 115 | 116 | \endinput 117 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxlatexstyleheadings.sty: -------------------------------------------------------------------------------- 1 | %% TITLES 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxlatexstyleheadings.sty}[2023/02/11 headings] 5 | 6 | \RequirePackage[nobottomtitles*]{titlesec} 7 | \@ifpackagelater{titlesec}{2016/03/15}% 8 | {\@ifpackagelater{titlesec}{2016/03/21}% 9 | {}% 10 | {\newif\ifsphinx@ttlpatch@ok 11 | \IfFileExists{etoolbox.sty}{% 12 | \RequirePackage{etoolbox}% 13 | \patchcmd{\ttlh@hang}{\parindent\z@}{\parindent\z@\leavevmode}% 14 | {\sphinx@ttlpatch@oktrue}{}% 15 | \ifsphinx@ttlpatch@ok 16 | \patchcmd{\ttlh@hang}{\noindent}{}{}{\sphinx@ttlpatch@okfalse}% 17 | \fi 18 | }{}% 19 | \ifsphinx@ttlpatch@ok 20 | \typeout{^^J Package Sphinx Info: ^^J 21 | **** titlesec 2.10.1 successfully patched for bugfix ****^^J}% 22 | \else 23 | \AtEndDocument{\PackageWarningNoLine{sphinx}{^^J% 24 | ******** titlesec 2.10.1 has a bug, (section numbers disappear) ......|^^J% 25 | ******** and Sphinx could not patch it, perhaps because your local ...|^^J% 26 | ******** copy is already fixed without a changed release date. .......|^^J% 27 | ******** If not, you must update titlesec! ...........................|}}% 28 | \sphinxbuildwarning{badtitlesec}% 29 | \fi 30 | }% 31 | }{} 32 | 33 | % Augment the sectioning commands used to get our own font family in place, 34 | % and reset some internal data items (\titleformat from titlesec package) 35 | \titleformat{\section}{\Large\py@HeaderFamily}% 36 | {\py@TitleColor\thesection}{0.5em}{\py@TitleColor} 37 | \titleformat{\subsection}{\large\py@HeaderFamily}% 38 | {\py@TitleColor\thesubsection}{0.5em}{\py@TitleColor} 39 | % \normalsize added as work-around to a lualatex-ja upstream problem 40 | % https://osdn.net/projects/luatex-ja/ticket/47321 41 | \titleformat{\subsubsection}{\normalsize\py@HeaderFamily}% 42 | {\py@TitleColor\thesubsubsection}{0.5em}{\py@TitleColor} 43 | % By default paragraphs (and subsubsections) will not be numbered because 44 | % sphinxmanual.cls and sphinxhowto.cls set secnumdepth to 2 45 | \titleformat{\paragraph}{\normalsize\py@HeaderFamily}% 46 | {\py@TitleColor\theparagraph}{0.5em}{\py@TitleColor} 47 | \titleformat{\subparagraph}{\normalsize\py@HeaderFamily}% 48 | {\py@TitleColor\thesubparagraph}{0.5em}{\py@TitleColor} 49 | 50 | 51 | % Since Sphinx 1.5, users should use HeaderFamily key to 'sphinxsetup' rather 52 | % than defining their own \py@HeaderFamily command (which is still possible). 53 | % Memo: \py@HeaderFamily is also used by \maketitle as defined in 54 | % sphinxmanual.cls/sphinxhowto.cls 55 | \newcommand{\py@HeaderFamily}{\spx@opt@HeaderFamily} 56 | 57 | % This sets up the fancy chapter headings that make the documents look 58 | % at least a little better than the usual LaTeX output. 59 | \@ifpackagewith{fncychap}{Bjarne}{ 60 | \ChNameVar {\raggedleft\normalsize \py@HeaderFamily} 61 | \ChNumVar {\raggedleft\Large \py@HeaderFamily} 62 | \ChTitleVar{\raggedleft\Large \py@HeaderFamily} 63 | % This creates (numbered) chapter heads without the leading \vspace*{}: 64 | \def\@makechapterhead#1{% 65 | {\parindent \z@ \raggedright \normalfont 66 | \ifnum \c@secnumdepth >\m@ne 67 | \if@mainmatter 68 | \DOCH 69 | \fi 70 | \fi 71 | \interlinepenalty\@M 72 | \if@mainmatter 73 | \DOTI{#1}% 74 | \else% 75 | \DOTIS{#1}% 76 | \fi 77 | }} 78 | }{}% <-- "false" clause of \@ifpackagewith 79 | 80 | % fix fncychap's bug which uses prematurely the \textwidth value 81 | \@ifpackagewith{fncychap}{Bjornstrup} 82 | {\AtBeginDocument{\mylen\textwidth\advance\mylen-2\myhi}}% 83 | {}% <-- "false" clause of \@ifpackagewith 84 | 85 | 86 | \endinput 87 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxlatexstylepage.sty: -------------------------------------------------------------------------------- 1 | %% PAGE STYLING 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxlatexstylepage.sty}[2021/01/27 page styling] 5 | 6 | % Separate paragraphs by space by default. 7 | \IfFileExists{parskip-2001-04-09.sty}% since September 2018 TeXLive update 8 | % new parskip.sty, but let it rollback to old one. 9 | % hopefully TeX installation not broken and LaTeX kernel not too old 10 | {\RequirePackage{parskip}[=v1]} 11 | % standard one from 1989. Admittedly \section of article/book gives possibly 12 | % anomalous spacing, but we can't require September 2018 release for some time. 13 | {\RequirePackage{parskip}} 14 | 15 | % Style parameters and macros used by most documents here 16 | \raggedbottom 17 | \sloppy 18 | \hbadness = 5000 % don't print trivial gripes 19 | 20 | % Require package fancyhdr except under memoir class 21 | \@ifclassloaded{memoir}{}{\RequirePackage{fancyhdr}} 22 | % Use \pagestyle{normal} as the primary pagestyle for text. 23 | % Redefine the 'normal' header/footer style when using "fancyhdr" package: 24 | \@ifpackageloaded{fancyhdr}{% 25 | \ltx@ifundefined{c@chapter} 26 | {% no \chapter, "howto" (non-Japanese) docclass 27 | \fancypagestyle{plain}{ 28 | \fancyhf{} 29 | \fancyfoot[C]{{\py@HeaderFamily\thepage}} 30 | \renewcommand{\headrulewidth}{0pt} 31 | \renewcommand{\footrulewidth}{0pt} 32 | } 33 | % Same as 'plain', this way we can use it in template 34 | % FIXME: shouldn't this have a running header with Name and Release like 'manual'? 35 | \fancypagestyle{normal}{ 36 | \fancyhf{} 37 | \fancyfoot[C]{{\py@HeaderFamily\thepage}} 38 | \renewcommand{\headrulewidth}{0pt} 39 | \renewcommand{\footrulewidth}{0pt} 40 | } 41 | }% 42 | {% classes with \chapter command 43 | \fancypagestyle{normal}{ 44 | \fancyhf{} 45 | \fancyfoot[RO]{{\py@HeaderFamily\thepage}} 46 | \fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}} 47 | \fancyhead[RO]{{\py@HeaderFamily \@title\sphinxheadercomma\py@release}} 48 | \if@twoside 49 | \fancyfoot[LE]{{\py@HeaderFamily\thepage}} 50 | \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}} 51 | \fancyhead[LE]{{\py@HeaderFamily \@title\sphinxheadercomma\py@release}} 52 | \fi 53 | \renewcommand{\headrulewidth}{0.4pt} 54 | \renewcommand{\footrulewidth}{0.4pt} 55 | % define chaptermark with \@chappos when \@chappos is available for Japanese 56 | \ltx@ifundefined{@chappos}{} 57 | {\def\chaptermark##1{\markboth{\@chapapp\space\thechapter\space\@chappos\space ##1}{}}} 58 | } 59 | % Update the plain style so we get the page number & footer line, 60 | % but not a chapter or section title. This is to keep the first 61 | % page of a chapter `clean.' 62 | \fancypagestyle{plain}{ 63 | \fancyhf{} 64 | \fancyfoot[RO]{{\py@HeaderFamily\thepage}} 65 | \if@twoside\fancyfoot[LE]{{\py@HeaderFamily\thepage}}\fi 66 | \renewcommand{\headrulewidth}{0pt} 67 | \renewcommand{\footrulewidth}{0.4pt} 68 | } 69 | } 70 | } 71 | {% no fancyhdr: memoir class 72 | % Provide default for 'normal' style simply as an alias of 'plain' style 73 | % This way we can use \pagestyle{normal} in LaTeX template 74 | \def\ps@normal{\ps@plain} 75 | % Users of memoir class are invited to redefine 'normal' style in preamble 76 | } 77 | 78 | 79 | \endinput 80 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxmanual.cls: -------------------------------------------------------------------------------- 1 | % 2 | % sphinxmanual.cls for Sphinx (https://www.sphinx-doc.org/) 3 | % 4 | 5 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 6 | \ProvidesClass{sphinxmanual}[2019/12/01 v2.3.0 Document class (Sphinx manual)] 7 | 8 | % chapters starting at odd pages (overridden by 'openany' document option) 9 | \PassOptionsToClass{openright}{\sphinxdocclass} 10 | 11 | % 'oneside' option overriding the 'twoside' default 12 | \newif\if@oneside 13 | \DeclareOption{oneside}{\@onesidetrue} 14 | % Pass remaining document options to the parent class. 15 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\sphinxdocclass}} 16 | \ProcessOptions\relax 17 | 18 | % Defaults two-side document 19 | \if@oneside 20 | % nothing to do (oneside is the default) 21 | \else 22 | \PassOptionsToClass{twoside}{\sphinxdocclass} 23 | \fi 24 | 25 | \LoadClass{\sphinxdocclass} 26 | 27 | % Set some sane defaults for section numbering depth and TOC depth. You can 28 | % reset these counters in your preamble. 29 | % 30 | \setcounter{secnumdepth}{2} 31 | \setcounter{tocdepth}{1} 32 | 33 | % Adapt \and command to the flushright context of \sphinxmaketitle, to 34 | % avoid ragged line endings if author names do not fit all on one single line 35 | \DeclareRobustCommand{\and}{% 36 | \end{tabular}\kern-\tabcolsep 37 | \allowbreak 38 | \hskip\dimexpr1em+\tabcolsep\@plus.17fil\begin{tabular}[t]{c}% 39 | }% 40 | % If it is desired that each author name be on its own line, use in preamble: 41 | %\DeclareRobustCommand{\and}{% 42 | % \end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}% 43 | %}% 44 | % Change the title page to look a bit better, and fit in with the fncychap 45 | % ``Bjarne'' style a bit better. 46 | % 47 | \newcommand{\sphinxmaketitle}{% 48 | \let\sphinxrestorepageanchorsetting\relax 49 | \ifHy@pageanchor\def\sphinxrestorepageanchorsetting{\Hy@pageanchortrue}\fi 50 | \hypersetup{pageanchor=false}% avoid duplicate destination warnings 51 | \begin{titlepage}% 52 | \let\footnotesize\small 53 | \let\footnoterule\relax 54 | \noindent\rule{\textwidth}{1pt}\par 55 | \begingroup % for PDF information dictionary 56 | \def\endgraf{ }\def\and{\& }% 57 | \pdfstringdefDisableCommands{\def\\{, }}% overwrite hyperref setup 58 | \hypersetup{pdfauthor={\@author}, pdftitle={\@title}}% 59 | \endgroup 60 | \begin{flushright}% 61 | \sphinxlogo 62 | \py@HeaderFamily 63 | {\Huge \@title \par} 64 | {\itshape\LARGE \py@release\releaseinfo \par} 65 | \vfill 66 | {\LARGE 67 | \begin{tabular}[t]{c} 68 | \@author 69 | \end{tabular}\kern-\tabcolsep 70 | \par} 71 | \vfill\vfill 72 | {\large 73 | \@date \par 74 | \vfill 75 | \py@authoraddress \par 76 | }% 77 | \end{flushright}%\par 78 | \@thanks 79 | \end{titlepage}% 80 | \setcounter{footnote}{0}% 81 | \let\thanks\relax\let\maketitle\relax 82 | %\gdef\@thanks{}\gdef\@author{}\gdef\@title{} 83 | \clearpage 84 | \ifdefined\sphinxbackoftitlepage\sphinxbackoftitlepage\fi 85 | \if@openright\cleardoublepage\else\clearpage\fi 86 | \sphinxrestorepageanchorsetting 87 | } 88 | 89 | \newcommand{\sphinxtableofcontents}{% 90 | \pagenumbering{roman}% 91 | \begingroup 92 | \parskip \z@skip 93 | \sphinxtableofcontentshook 94 | \tableofcontents 95 | \endgroup 96 | % before resetting page counter, let's do the right thing. 97 | \if@openright\cleardoublepage\else\clearpage\fi 98 | \pagenumbering{arabic}% 99 | } 100 | 101 | % This is needed to get the width of the section # area wide enough in the 102 | % library reference. Doing it here keeps it the same for all the manuals. 103 | % 104 | \newcommand{\sphinxtableofcontentshook}{% 105 | \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.6em}}% 106 | \renewcommand*\l@subsection{\@dottedtocline{2}{4.1em}{3.5em}}% 107 | } 108 | 109 | % Fix the bibliography environment to add an entry to the Table of 110 | % Contents. 111 | % For a report document class this environment is a chapter. 112 | % 113 | \newenvironment{sphinxthebibliography}[1]{% 114 | \if@openright\cleardoublepage\else\clearpage\fi 115 | % \phantomsection % not needed here since TeXLive 2010's hyperref 116 | \begin{thebibliography}{#1}% 117 | \addcontentsline{toc}{chapter}{\bibname}}{\end{thebibliography}} 118 | 119 | % Same for the indices. 120 | % The memoir class already does this, so we don't duplicate it in that case. 121 | % 122 | \@ifclassloaded{memoir} 123 | {\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}} 124 | {\newenvironment{sphinxtheindex}{% 125 | \if@openright\cleardoublepage\else\clearpage\fi 126 | \phantomsection % needed as no chapter, section, ... created 127 | \begin{theindex}% 128 | \addcontentsline{toc}{chapter}{\indexname}}{\end{theindex}}} 129 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxmessages.sty: -------------------------------------------------------------------------------- 1 | % 2 | % sphinxmessages.sty 3 | % 4 | % message resources for Sphinx 5 | % 6 | \ProvidesPackage{sphinxmessages}[2019/01/04 v2.0 Localized LaTeX macros (Sphinx team)] 7 | 8 | \renewcommand{\literalblockcontinuedname}{continued from previous page} 9 | \renewcommand{\literalblockcontinuesname}{continues on next page} 10 | \renewcommand{\sphinxnonalphabeticalgroupname}{Non\sphinxhyphen{}alphabetical} 11 | \renewcommand{\sphinxsymbolsname}{Symbols} 12 | \renewcommand{\sphinxnumbersname}{Numbers} 13 | \def\pageautorefname{page} 14 | 15 | \addto\captionsenglish{\renewcommand{\figurename}{Fig.\@{} }} 16 | \def\fnum@figure{\figurename\thefigure{}} 17 | 18 | \addto\captionsenglish{\renewcommand{\tablename}{Table }} 19 | \def\fnum@table{\tablename\thetable{}} 20 | 21 | \addto\captionsenglish{\renewcommand{\literalblockname}{Listing}} -------------------------------------------------------------------------------- /docs/build/latex/sphinxoptionsgeometry.sty: -------------------------------------------------------------------------------- 1 | %% OPTIONS FOR GEOMETRY 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxoptionsgeometry.sty}[2021/01/27 geometry] 5 | 6 | % geometry 7 | \ifx\kanjiskip\@undefined 8 | \PassOptionsToPackage{% 9 | hmargin={\unexpanded{\spx@opt@hmargin}},% 10 | vmargin={\unexpanded{\spx@opt@vmargin}},% 11 | marginpar=\unexpanded{\spx@opt@marginpar}} 12 | {geometry} 13 | \else 14 | % set text width for Japanese documents to be integer multiple of 1zw 15 | % and text height to be integer multiple of \baselineskip 16 | % the execution is delayed to \sphinxsetup then geometry.sty 17 | \normalsize\normalfont 18 | \newcommand*\sphinxtextwidthja[1]{% 19 | \if@twocolumn\tw@\fi 20 | \dimexpr 21 | \numexpr\dimexpr\paperwidth-\tw@\dimexpr#1\relax\relax/ 22 | \dimexpr\if@twocolumn\tw@\else\@ne\fi zw\relax 23 | zw\relax}% 24 | \newcommand*\sphinxmarginparwidthja[1]{% 25 | \dimexpr\numexpr\dimexpr#1\relax/\dimexpr1zw\relax zw\relax}% 26 | \newcommand*\sphinxtextlinesja[1]{% 27 | \numexpr\@ne+\dimexpr\paperheight-\topskip-\tw@\dimexpr#1\relax\relax/ 28 | \baselineskip\relax}% 29 | \ifx\@jsc@uplatextrue\@undefined\else 30 | % the way we found in order for the papersize special written by 31 | % geometry in the dvi file to be correct in case of jsbook class 32 | \ifnum\mag=\@m\else % do nothing special if nomag class option or 10pt 33 | \PassOptionsToPackage{truedimen}{geometry}% 34 | \fi 35 | \fi 36 | \PassOptionsToPackage{% 37 | hmarginratio={1:1},% 38 | textwidth=\unexpanded{\sphinxtextwidthja{\spx@opt@hmargin}},% 39 | vmarginratio={1:1},% 40 | lines=\unexpanded{\sphinxtextlinesja{\spx@opt@vmargin}},% 41 | marginpar=\unexpanded{\sphinxmarginparwidthja{\spx@opt@marginpar}},% 42 | footskip=2\baselineskip,% 43 | }{geometry}% 44 | \AtBeginDocument 45 | {% update a dimension used by the jsclasses 46 | \ifx\@jsc@uplatextrue\@undefined\else\fullwidth\textwidth\fi 47 | % for some reason, jreport normalizes all dimensions with \@settopoint 48 | \@ifclassloaded{jreport} 49 | {\@settopoint\textwidth\@settopoint\textheight\@settopoint\marginparwidth} 50 | {}% <-- "false" clause of \@ifclassloaded 51 | }% 52 | \fi 53 | 54 | \endinput 55 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxoptionshyperref.sty: -------------------------------------------------------------------------------- 1 | %% Bookmarks and hyperlinks 2 | % 3 | % change this info string if making any custom modification 4 | \ProvidesFile{sphinxoptionshyperref.sty}[2021/01/27 hyperref] 5 | 6 | % to make pdf with correct encoded bookmarks in Japanese 7 | % this should precede the hyperref package 8 | \ifx\kanjiskip\@undefined 9 | % for non-Japanese: make sure bookmarks are ok also with lualatex 10 | \PassOptionsToPackage{pdfencoding=unicode}{hyperref} 11 | \else 12 | \RequirePackage{atbegshi} 13 | \ifx\ucs\@undefined 14 | \ifnum 42146=\euc"A4A2 15 | \AtBeginShipoutFirst{\special{pdf:tounicode EUC-UCS2}} 16 | \else 17 | \AtBeginShipoutFirst{\special{pdf:tounicode 90ms-RKSJ-UCS2}} 18 | \fi 19 | \else 20 | \AtBeginShipoutFirst{\special{pdf:tounicode UTF8-UCS2}} 21 | \fi 22 | \fi 23 | 24 | \ifx\@jsc@uplatextrue\@undefined\else 25 | \PassOptionsToPackage{setpagesize=false}{hyperref} 26 | \fi 27 | 28 | % These options can be overridden inside 'hyperref' key 29 | % or by later use of \hypersetup. 30 | \PassOptionsToPackage{colorlinks,breaklinks,% 31 | linkcolor=InnerLinkColor,filecolor=OuterLinkColor,% 32 | menucolor=OuterLinkColor,urlcolor=OuterLinkColor,% 33 | citecolor=InnerLinkColor}{hyperref} 34 | 35 | \endinput 36 | -------------------------------------------------------------------------------- /docs/build/latex/sphinxpackagecyrillic.sty: -------------------------------------------------------------------------------- 1 | %% CYRILLIC IN NON-CYRILLIC DOCUMENTS (pdflatex only) 2 | % 3 | % refs: https://tex.stackexchange.com/q/460271/ 4 | \ProvidesPackage{sphinxpackagecyrillic}% 5 | [2018/11/21 v2.0 support for Cyrillic in non-Cyrillic documents] 6 | \RequirePackage{kvoptions} 7 | \SetupKeyvalOptions{prefix=spx@cyropt@} % use \spx@cyropt@ prefix 8 | \DeclareBoolOption[false]{Xtwo} 9 | \DeclareBoolOption[false]{TtwoA} 10 | \DeclareDefaultOption{\@unknownoptionerror} 11 | \ProcessLocalKeyvalOptions* % ignore class options 12 | 13 | \ifspx@cyropt@Xtwo 14 | % original code by tex.sx user egreg (updated 2019/10/28): 15 | % https://tex.stackexchange.com/a/460325/ 16 | % 159 Cyrillic glyphs as available in X2 TeX 8bit font encoding 17 | % This assumes inputenc loaded with utf8 option, or LaTeX release 18 | % as recent as 2018/04/01 which does it automatically. 19 | \@tfor\next:=% 20 | {Ё}{Ђ}{Є}{Ѕ}{І}{Ј}{Љ}{Њ}{Ћ}{Ў}{Џ}{А}{Б}{В}{Г}{Д}{Е}{Ж}{З}{И}{Й}% 21 | {К}{Л}{М}{Н}{О}{П}{Р}{С}{Т}{У}{Ф}{Х}{Ц}{Ч}{Ш}{Щ}{Ъ}{Ы}{Ь}{Э}{Ю}% 22 | {Я}{а}{б}{в}{г}{д}{е}{ж}{з}{и}{й}{к}{л}{м}{н}{о}{п}{р}{с}{т}{у}% 23 | {ф}{х}{ц}{ч}{ш}{щ}{ъ}{ы}{ь}{э}{ю}{я}{ё}{ђ}{є}{ѕ}{і}{ј}{љ}{њ}{ћ}% 24 | {ў}{џ}{Ѣ}{ѣ}{Ѫ}{ѫ}{Ѵ}{ѵ}{Ґ}{ґ}{Ғ}{ғ}{Ҕ}{ҕ}{Җ}{җ}{Ҙ}{ҙ}{Қ}{қ}{Ҝ}{ҝ}% 25 | {Ҟ}{ҟ}{Ҡ}{ҡ}{Ң}{ң}{Ҥ}{ҥ}{Ҧ}{ҧ}{Ҩ}{ҩ}{Ҫ}{ҫ}{Ҭ}{ҭ}{Ү}{ү}{Ұ}{ұ}{Ҳ}{ҳ}% 26 | {Ҵ}{ҵ}{Ҷ}{ҷ}{Ҹ}{ҹ}{Һ}{һ}{Ҽ}{ҽ}{Ҿ}{ҿ}{Ӏ}{Ӄ}{ӄ}{Ӆ}{ӆ}{Ӈ}{ӈ}{Ӌ}{ӌ}% 27 | {Ӎ}{ӎ}{Ӕ}{ӕ}{Ә}{ә}{Ӡ}{ӡ}{Ө}{ө}\do 28 | {% 29 | \begingroup\def\IeC{\protect\DeclareTextSymbolDefault}% 30 | \protected@edef\@temp{\endgroup 31 | \@ifl@t@r{\fmtversion}{2019/10/01}{\csname u8:\next\endcsname}{\next}}% 32 | \@temp{X2}% 33 | }% 34 | \else 35 | \ifspx@cyropt@TtwoA 36 | % original code by tex.sx user jfbu: 37 | % https://tex.stackexchange.com/a/460305/ 38 | % 63*2+1=127 Cyrillic glyphs as found in T2A 8bit TeX font-encoding 39 | \@tfor\@tempa:=% 40 | {ae}{a}{b}{chrdsc}{chvcrs}{ch}{c}{dje}{dze}{dzhe}{d}{erev}{ery}{e}% 41 | {f}{ghcrs}{gup}{g}{hdsc}{hrdsn}{h}{ie}{ii}{ishrt}{i}{je}% 42 | {kbeak}{kdsc}{kvcrs}{k}{lje}{l}{m}{ndsc}{ng}{nje}{n}{otld}{o}{p}{r}% 43 | {schwa}{sdsc}{sftsn}{shch}{shha}{sh}{s}{tshe}{t}{ushrt}{u}{v}% 44 | {ya}{yhcrs}{yi}{yo}{yu}{y}{zdsc}{zhdsc}{zh}{z}\do 45 | {% 46 | \expandafter\DeclareTextSymbolDefault\expandafter 47 | {\csname cyr\@tempa\endcsname}{T2A}% 48 | \expandafter\uppercase\expandafter{\expandafter 49 | \def\expandafter\@tempa\expandafter{\@tempa}}% 50 | \expandafter\DeclareTextSymbolDefault\expandafter 51 | {\csname CYR\@tempa\endcsname}{T2A}% 52 | }% 53 | \DeclareTextSymbolDefault{\CYRpalochka}{T2A}% 54 | \fi\fi 55 | \endinput 56 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # 4 | # DFOLS documentation build configuration file, created by 5 | # sphinx-quickstart on Thu Aug 10 14:36:06 2017. 6 | # 7 | # This file is execfile()d with the current directory set to its 8 | # containing dir. 9 | # 10 | # Note that not all possible configuration values are present in this 11 | # autogenerated file. 12 | # 13 | # All configuration values have a default; values that are commented out 14 | # serve to show the default. 15 | 16 | # If extensions (or modules to document with autodoc) are in another directory, 17 | # add these directories to sys.path here. If the directory is relative to the 18 | # documentation root, use os.path.abspath to make it absolute, like shown here. 19 | # 20 | import os 21 | import datetime 22 | import dfols 23 | 24 | current_year = datetime.date.today().year # used for copyright information 25 | dfols_version = dfols.__version__ 26 | 27 | 28 | # -- General configuration ------------------------------------------------ 29 | 30 | # If your documentation needs a minimal Sphinx version, state it here. 31 | # 32 | # needs_sphinx = '1.0' 33 | 34 | # Add any Sphinx extension module names here, as strings. They can be 35 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 36 | # ones. 37 | extensions = ['sphinx.ext.mathjax', 'sphinx.ext.githubpages'] 38 | 39 | # Add any paths that contain templates here, relative to this directory. 40 | #templates_path = ['_templates'] 41 | 42 | # The suffix(es) of source filenames. 43 | # You can specify multiple suffix as a list of string: 44 | # 45 | # source_suffix = ['.rst', '.md'] 46 | source_suffix = '.rst' 47 | 48 | # The master toctree document. 49 | master_doc = 'index' 50 | 51 | # General information about the project. 52 | project = 'DFO-LS' 53 | copyright = '2017-%g, Lindon Roberts' % current_year 54 | author = 'Lindon Roberts' 55 | 56 | # The version info for the project you're documenting, acts as replacement for 57 | # |version| and |release|, also used in various other places throughout the 58 | # built documents. 59 | # 60 | # The short X.Y version. 61 | version = dfols_version 62 | # The full version, including alpha/beta/rc tags. 63 | release = dfols_version 64 | 65 | # The language for content autogenerated by Sphinx. Refer to documentation 66 | # for a list of supported languages. 67 | # 68 | # This is also used if you do content translation via gettext catalogs. 69 | # Usually you set "language" from the command line for these cases. 70 | language = None 71 | 72 | # There are two options for replacing |today|: either, you set today to some 73 | # non-false value, then it is used: 74 | #today = '20 June, 2016' 75 | # Else, today_fmt is used as the format for a strftime call. 76 | today_fmt = '%d %B %Y' 77 | 78 | # List of patterns, relative to source directory, that match files and 79 | # directories to ignore when looking for source files. 80 | # This patterns also effect to html_static_path and html_extra_path 81 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 82 | 83 | # The name of the Pygments (syntax highlighting) style to use. 84 | pygments_style = 'sphinx' 85 | 86 | # If true, `todo` and `todoList` produce output, else they produce nothing. 87 | todo_include_todos = False 88 | 89 | 90 | # -- Options for HTML output ---------------------------------------------- 91 | 92 | # The theme to use for HTML and HTML Help pages. See the documentation for 93 | # a list of builtin themes. 94 | # 95 | html_theme = 'sphinx_rtd_theme' 96 | 97 | 98 | # The name for this set of Sphinx documents. If None, it defaults to 99 | # " v documentation". 100 | html_title = 'DFO-LS v%s documentation' % dfols_version 101 | 102 | # Theme options are theme-specific and customize the look and feel of a theme 103 | # further. For a list of options available for each theme, see the 104 | # documentation. 105 | # 106 | # html_theme_options = {} 107 | 108 | # Add any paths that contain custom static files (such as style sheets) here, 109 | # relative to this directory. They are copied after the builtin static files, 110 | # so a file named "default.css" will overwrite the builtin "default.css". 111 | #html_static_path = ['_static'] 112 | 113 | # Custom sidebar templates, must be a dictionary that maps document names 114 | # to template names. 115 | # 116 | # This is required for the alabaster theme 117 | # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars 118 | html_sidebars = { 119 | '**': [ 120 | 'about.html', 121 | 'navigation.html', 122 | 'relations.html', # needs 'show_related': True theme option to display 123 | 'searchbox.html', 124 | 'donate.html', 125 | ] 126 | } 127 | 128 | 129 | # -- Options for HTMLHelp output ------------------------------------------ 130 | 131 | # Output file base name for HTML help builder. 132 | htmlhelp_basename = 'DFOLSdoc' 133 | 134 | 135 | # -- Options for LaTeX output --------------------------------------------- 136 | 137 | latex_elements = { 138 | # The paper size ('letterpaper' or 'a4paper'). 139 | # 140 | # 'papersize': 'letterpaper', 141 | 142 | # The font size ('10pt', '11pt' or '12pt'). 143 | # 144 | # 'pointsize': '10pt', 145 | 146 | # Additional stuff for the LaTeX preamble. 147 | # 148 | # 'preamble': '', 149 | 150 | # Latex figure (float) alignment 151 | # 152 | # 'figure_align': 'htbp', 153 | } 154 | 155 | # Grouping the document tree into LaTeX files. List of tuples 156 | # (source start file, target name, title, 157 | # author, documentclass [howto, manual, or own class]). 158 | latex_documents = [ 159 | (master_doc, 'DFOLS.tex', 'DFO-LS Documentation', 160 | 'Lindon Roberts', 'manual'), 161 | ] 162 | 163 | 164 | # -- Options for manual page output --------------------------------------- 165 | 166 | # One entry per manual page. List of tuples 167 | # (source start file, name, description, authors, manual section). 168 | man_pages = [ 169 | (master_doc, 'dfols', 'DFO-LS Documentation', 170 | [author], 1) 171 | ] 172 | 173 | 174 | # -- Options for Texinfo output ------------------------------------------- 175 | 176 | # Grouping the document tree into Texinfo files. List of tuples 177 | # (source start file, target name, title, author, 178 | # dir menu entry, description, category) 179 | texinfo_documents = [ 180 | (master_doc, 'DFOLS', 'DFO-LS Documentation', 181 | author, 'DFO-LS', 'One line description of project.', 182 | 'Miscellaneous'), 183 | ] 184 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /docs/contributors.rst: -------------------------------------------------------------------------------- 1 | Contributors 2 | ============ 3 | 4 | Main author 5 | ----------- 6 | * `Lindon Roberts `_ (University of Sydney) 7 | 8 | Contributors 9 | ------------ 10 | * Matthew Hough (University of Waterloo): handle general convex constraints [version 1.3] 11 | * Yanjun Liu (Princeton University): nonsmooth regularizer [version 1.5] 12 | * Kevin Lam (Australian National University): nonsmooth regularizer [version 1.5] 13 | -------------------------------------------------------------------------------- /docs/copy_html_to_maths.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rsync -avz build/html/* robertsl@gate.maths.ox.ac.uk:public_html/dfols 4 | 5 | -------------------------------------------------------------------------------- /docs/data_fitting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/docs/data_fitting.png -------------------------------------------------------------------------------- /docs/diagnostic.rst: -------------------------------------------------------------------------------- 1 | Diagnostic Information 2 | ====================== 3 | In :doc:`userguide`, we saw that the output of DFO-LS returns a container which includes diagnostic information about the progress of the algorithm (:code:`soln.diagnostic_info`). This object is a `Pandas `_ DataFrame, with one row per iteration of the algorithm. In this section, we explain the meaning of each type of output (the columns of the DataFrame). 4 | 5 | To save this information to a CSV file, use: 6 | 7 | .. code-block:: python 8 | 9 | # Previously: define objfun and x0 10 | 11 | # Turn on diagnostic information 12 | user_params = {'logging.save_diagnostic_info': True} 13 | 14 | # Call DFO-LS 15 | soln = dfols.solve(objfun, x0, user_params=user_params) 16 | 17 | # Save diagnostic info to CSV 18 | soln.diagnostic_info.to_csv('myfile.csv') 19 | 20 | Depending on exactly how DFO-LS terminates, the last row of results may not be fully populated. 21 | 22 | Current Iterate 23 | --------------- 24 | * :code:`xk` - Best point found so far (current iterate). This is only saved if :code:`user_params['logging.save_xk'] = True`. 25 | * :code:`rk` - The vector of residuals at the current iterate. This is only saved if :code:`user_params['logging.save_rk'] = True`. 26 | * :code:`fk` - The value of :math:`f` at the current iterate. 27 | 28 | Trust Region 29 | ------------ 30 | * :code:`rho` - The lower bound on the trust region radius :math:`\rho_k`. 31 | * :code:`delta` - The trust region radius :math:`\Delta_k`. 32 | * :code:`norm_sk` - The norm of the trust region step :math:`\|s_k\|`. 33 | 34 | Model Interpolation 35 | ------------------- 36 | * :code:`npt` - The number of interpolation points. 37 | * :code:`interpolation_error` - The sum of squares of the interpolation errors from the interpolated model. 38 | * :code:`interpolation_condition_number` - The condition number of the matrix in the interpolation linear system. 39 | * :code:`interpolation_change_J_norm` - The Frobenius norm of the change in Jacobian at this iteration, :math:`\|J_k-J_{k-1}\|_F`. 40 | * :code:`interpolation_total_residual` - The total residual from the interpolation optimization problem. 41 | * :code:`poisedness` - The smallest value of :math:`\Lambda` for which the current interpolation set :math:`Y_k` is :math:`\Lambda`-poised in the current trust region. This is the most expensive piece of information to compute, and is only computed if :code:`user_params['logging.save_poisedness' = True`. 42 | * :code:`max_distance_xk` - The maximum distance from any interpolation point to the current iterate. 43 | * :code:`norm_gk` - The norm of the model gradient :math:`\|g_k\|`. 44 | 45 | Iteration Count 46 | --------------- 47 | * :code:`nruns` - The number of times the algorithm has been restarted. 48 | * :code:`nf` - The number of objective evaluations so far (see :code:`soln.nf`) 49 | * :code:`nx` - The number of points at which the objective has been evaluated so far (see :code:`soln.nx`) 50 | * :code:`nsamples` - The total number of objective evaluations used for all current interpolation points. 51 | * :code:`iter_this_run` - The number of iterations since the last restart. 52 | * :code:`iters_total` - The total number of iterations so far. 53 | 54 | Algorithm Progress 55 | ------------------ 56 | * :code:`iter_type` - A text description of what type of iteration we had (e.g. Successful, Safety, etc.) 57 | * :code:`ratio` - The ratio of actual to predicted objective reduction in the trust region step. 58 | * :code:`slow_iter` - Equal to 1 if the current iteration is successful but slow, 0 if is successful but not slow, and -1 if was not successful. 59 | 60 | -------------------------------------------------------------------------------- /docs/history.rst: -------------------------------------------------------------------------------- 1 | Version History 2 | =============== 3 | This section lists the different versions of DFO-LS and the updates between them. 4 | 5 | Version 1.0 (6 Feb 2018) 6 | ------------------------ 7 | * Initial release of DFO-LS 8 | 9 | Version 1.0.1 (20 Feb 2018) 10 | --------------------------- 11 | * Minor bug fix to trust region subproblem solver (the output :code:`crvmin` is calculated correctly) - this has minimal impact on the performance of DFO-LS. 12 | 13 | Version 1.0.2 (20 Jun 2018) 14 | --------------------------- 15 | * Extra optional input :code:`args` which passes through arguments for :code:`objfun`. 16 | * Bug fixes: default parameters for reduced initialization cost regime, returning correct value if exiting from within a safety step, retrieving dependencies during installation. 17 | 18 | Version 1.1 (16 Jan 2019) 19 | ------------------------- 20 | * Use different default reduced initialization cost method for inverse problems to ensure whole space is searched correctly. 21 | * Bug fixes: default trust region radius when scaling feasible region, exit correctly when no Jacobian returned, handling overflow at initial value 22 | 23 | Version 1.1.1 (5 Apr 2019) 24 | -------------------------- 25 | * Link code to Zenodo, to create DOI - no changes to the DFO-LS algorithm. 26 | 27 | Version 1.2 (12 Feb 2020) 28 | ------------------------- 29 | * Use deterministic initialisation by default (so it is no longer necessary to set a random seed for reproducibility of DFO-LS results). 30 | * Full model Hessian stored rather than just upper triangular part - this improves the runtime of Hessian-based operations. 31 | * Faster trust-region and geometry subproblem solutions in Fortran using the `trustregion `_ package. 32 | * Faster interpolation solution for multiple right-hand sides. 33 | * Don't adjust starting point if it is close to the bounds (as long as it is feasible). 34 | * Option to stop default logging behavior and/or enable per-iteration printing. 35 | * Bugfix: correctly handle 1-sided bounds as inputs, avoid divide-by-zero warnings when auto-detecting restarts. 36 | 37 | Version 1.2.1 (13 Feb 2020) 38 | --------------------------- 39 | * Make the use of the `trustregion `_ package optional, not installed by default. 40 | 41 | Version 1.2.2 (26 Feb 2021) 42 | --------------------------- 43 | * Minor update to remove NumPy deprecation warnings - no changes to the DFO-LS algorithm. 44 | 45 | Version 1.2.3 (1 Jun 2021) 46 | --------------------------- 47 | * Minor update to customise handling of NaNs in objective evaluations - no changes to the DFO-LS algorithm. 48 | 49 | Version 1.3.0 (8 Nov 2021) 50 | --------------------------- 51 | * Handle finitely many arbitrary convex constraints in addition to simple bound constraints. 52 | * Add module-level logging for more informative log outputs. 53 | * Only new functionality is added, so there is no change to the solver for unconstrained/bound-constrained problems. 54 | 55 | Version 1.4.0 (29 Jan 2024) 56 | --------------------------- 57 | * Require newer SciPy version (at least 1.11) as a dependency - avoids occasional undetermined behavior but no changes to the DFO-LS algorithm. 58 | * Gracefully handle NaN objective value from evaluation at a new trial point (trust-region step). 59 | 60 | Version 1.4.1 (11 Apr 2024) 61 | --------------------------- 62 | * Migrate package setup to pyproject.toml (required for Python version 3.12) 63 | * Drop support for Python 2.7 and <=3.8 in line with SciPy >=1.11 dependency (introduced v1.4.0) 64 | 65 | Version 1.5.0 (11 Sep 2024) 66 | --------------------------- 67 | * Add support for (possibly nonsmooth) regularizer term. 68 | * Drop warning about infeasible initial point if the point is on an upper/lower bound. 69 | 70 | Version 1.5.1 (10 Oct 2024) 71 | --------------------------- 72 | * Add return values :code:`soln.xmin_eval_num` and :code:`soln.jacmin_eval_nums` 73 | * Allow option for parallel initial evaluations for non-random directions if :code:`npt` not too large 74 | 75 | Version 1.5.2 (28 Oct 2024) 76 | --------------------------- 77 | * Bugfix for saving diagnostic info (bug introduced in v1.5.1) 78 | 79 | Version 1.5.3 (30 Oct 2024) 80 | --------------------------- 81 | * Bugfix when starting solver at problem minimizer (bug introduced in v1.5.1) 82 | 83 | Version 1.5.4 (11 Feb 2025) 84 | --------------------------- 85 | * Bugfix when printing results from a run which terminated early 86 | * Add ability to save/load results to/from a dictionary 87 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. DFO-LS documentation master file, created by 2 | You can adapt this file completely to your liking, but it should at least 3 | contain the root `toctree` directive. 4 | 5 | DFO-LS: Derivative-Free Optimizer for Least-Squares Minimization 6 | ================================================================ 7 | 8 | **Release:** |version| 9 | 10 | **Date:** |today| 11 | 12 | **Author:** `Lindon Roberts `_ 13 | 14 | DFO-LS is a flexible package for finding local solutions to nonlinear least-squares minimization problems (with optional regularizer and constraints), without requiring any derivatives of the objective. DFO-LS stands for Derivative-Free Optimizer for Least-Squares. 15 | 16 | That is, DFO-LS solves 17 | 18 | .. math:: 19 | 20 | \min_{x\in\mathbb{R}^n} &\quad f(x) := \sum_{i=1}^{m}r_{i}(x)^2 + h(x) \\ 21 | \text{s.t.} &\quad a \leq x \leq b\\ 22 | &\quad x \in C := C_1 \cap \cdots \cap C_n, \quad \text{all $C_i$ convex}\\ 23 | 24 | The optional regularizer :math:`h(x)` is a Lipschitz continuous and convex, but possibly non-differentiable function that is typically used to avoid overfitting. 25 | A common choice is :math:`h(x)=\lambda \|x\|_1` (called L1 regularization or LASSO) for :math:`\lambda>0`. 26 | Note that in the case of Tikhonov regularization/ridge regression, :math:`h(x)=\lambda\|x\|_2^2` is not Lipschitz continuous, so should instead be incorporated by adding an extra term into the least-squares sum, :math:`r_{m+1}(x)=\sqrt{\lambda} \|x\|_2`. 27 | The (optional) constraint set :math:`C` is the intersection of multiple convex sets provided as input by the user. All constraints are non-relaxable (i.e. DFO-LS will never ask to evaluate a point that is not feasible), although the general constraints :math:`x\in C` may be slightly violated from rounding errors. 28 | 29 | Full details of the DFO-LS algorithm are given in our papers: 30 | 31 | 1. C. Cartis, J. Fiala, B. Marteau and L. Roberts, `Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers `_, *ACM Transactions on Mathematical Software*, 45:3 (2019), pp. 32:1-32:41 [`preprint `_] . 32 | 2. M. Hough, and L. Roberts, `Model-Based Derivative-Free Methods for Convex-Constrained Optimization `_, *SIAM Journal on Optimization*, 21:4 (2022), pp. 2552-2579 [`preprint `_]. 33 | 3. Y. Liu, K. H. Lam and L. Roberts, `Black-box Optimization Algorithms for Regularized Least-squares Problems `_, *arXiv preprint arXiv:arXiv:2407.14915*, 2024. 34 | 35 | DFO-LS is a more flexible version of `DFO-GN `_. 36 | 37 | If you are interested in solving general optimization problems (without a least-squares structure), you may wish to try `Py-BOBYQA `_, which has many of the same features as DFO-LS. 38 | 39 | DFO-LS is released under the GNU General Public License. Please `contact NAG `_ for alternative licensing. 40 | 41 | .. toctree:: 42 | :maxdepth: 2 43 | :caption: Contents: 44 | 45 | install 46 | info 47 | userguide 48 | advanced 49 | diagnostic 50 | history 51 | contributors 52 | 53 | Acknowledgements 54 | ---------------- 55 | This software was initially developed under the supervision of `Coralia Cartis `_, and was supported by the EPSRC Centre For Doctoral Training in `Industrially Focused Mathematical Modelling `_ (EP/L015803/1) in collaboration with the `Numerical Algorithms Group `_. Development of DFO-LS has also been supported by the Australian Research Council (DE240100006). 56 | -------------------------------------------------------------------------------- /docs/install.rst: -------------------------------------------------------------------------------- 1 | Installing DFO-LS 2 | ================= 3 | 4 | Requirements 5 | ------------ 6 | DFO-LS requires the following software to be installed: 7 | 8 | * Python 3.9 or higher (http://www.python.org/) 9 | 10 | Additionally, the following python packages should be installed (these will be installed automatically if using *pip*, see `Installation using pip`_): 11 | 12 | * NumPy (http://www.numpy.org/) 13 | * SciPy version 1.11 or higher (http://www.scipy.org/) 14 | * Pandas (http://pandas.pydata.org/) 15 | 16 | **Optional package:** DFO-LS versions 1.2 and higher also support the `trustregion `_ package for fast trust-region subproblem solutions. To install this, make sure you have a Fortran compiler (e.g. `gfortran `_) and NumPy installed, then run :code:`pip install trustregion`. You do not have to have trustregion installed for DFO-LS to work, and it is not installed by default. 17 | 18 | Installation using conda 19 | ------------------------ 20 | DFO-LS can be directly installed in Anaconda environments using `conda-forge `_: 21 | 22 | .. code-block:: bash 23 | 24 | $ conda install -c conda-forge dfo-ls 25 | 26 | Installation using pip 27 | ---------------------- 28 | For easy installation, use *pip* (http://www.pip-installer.org/) as root: 29 | 30 | .. code-block:: bash 31 | 32 | $ pip install DFO-LS 33 | 34 | Note that if an older install of DFO-LS is present on your system you can use: 35 | 36 | .. code-block:: bash 37 | 38 | $ pip install --upgrade DFO-LS 39 | 40 | to upgrade DFO-LS to the latest version. 41 | 42 | Manual installation 43 | ------------------- 44 | Alternatively, you can download the source code from `Github `_ and unpack as follows: 45 | 46 | .. code-block:: bash 47 | 48 | $ git clone https://github.com/numericalalgorithmsgroup/dfols 49 | $ cd dfols 50 | 51 | DFO-LS is written in pure Python and requires no compilation. It can be installed using: 52 | 53 | .. code-block:: bash 54 | 55 | $ pip install . 56 | 57 | To upgrade DFO-LS to the latest version, navigate to the top-level directory (i.e. the one containing :code:`pyproject.toml`) and rerun the installation using :code:`pip`, as above: 58 | 59 | .. code-block:: bash 60 | 61 | $ git pull 62 | $ pip install . 63 | 64 | Testing 65 | ------- 66 | If you installed DFO-LS manually, you can test your installation using the pytest package: 67 | 68 | .. code-block:: bash 69 | 70 | $ pip install pytest 71 | $ python -m pytest --pyargs dfols 72 | 73 | Alternatively, this documentation provides some simple examples of how to run DFO-LS. 74 | 75 | Uninstallation 76 | -------------- 77 | If DFO-LS was installed using *pip* you can uninstall as follows: 78 | 79 | .. code-block:: bash 80 | 81 | $ pip uninstall DFO-LS 82 | 83 | If DFO-LS was installed manually you have to remove the installed files by hand (located in your python site-packages directory). 84 | 85 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=python -msphinx 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | set SPHINXPROJ=DFOLS 13 | 14 | if "%1" == "" goto help 15 | 16 | %SPHINXBUILD% >NUL 2>NUL 17 | if errorlevel 9009 ( 18 | echo. 19 | echo.The Sphinx module was not found. Make sure you have Sphinx installed, 20 | echo.then set the SPHINXBUILD environment variable to point to the full 21 | echo.path of the 'sphinx-build' executable. Alternatively you may add the 22 | echo.Sphinx directory to PATH. 23 | echo. 24 | echo.If you don't have Sphinx installed, grab it from 25 | echo.http://sphinx-doc.org/ 26 | exit /b 1 27 | ) 28 | 29 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 30 | goto end 31 | 32 | :help 33 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 34 | 35 | :end 36 | popd 37 | -------------------------------------------------------------------------------- /examples/data_fitting.py: -------------------------------------------------------------------------------- 1 | # DFO-LS example: data fitting problem 2 | # Originally from: 3 | # https://uk.mathworks.com/help/optim/ug/lsqcurvefit.html 4 | from __future__ import print_function 5 | import numpy as np 6 | import dfols 7 | 8 | # Observations 9 | tdata = np.array([0.9, 1.5, 13.8, 19.8, 24.1, 28.2, 35.2, 10 | 60.3, 74.6, 81.3]) 11 | ydata = np.array([455.2, 428.6, 124.1, 67.3, 43.2, 28.1, 13.1, 12 | -0.4, -1.3, -1.5]) 13 | 14 | # Model is y(t) = x[0] * exp(x[1] * t) 15 | def prediction_error(x): 16 | return ydata - x[0] * np.exp(x[1] * tdata) 17 | 18 | # Define the starting point 19 | x0 = np.array([100.0, -1.0]) 20 | 21 | # We expect exponential decay: set upper bound x[1] <= 0 22 | upper = np.array([1e20, 0.0]) 23 | 24 | # Call DFO-LS 25 | soln = dfols.solve(prediction_error, x0, bounds=(None, upper)) 26 | 27 | # Display output 28 | print(soln) 29 | exit() 30 | 31 | # Plot calibrated model vs. observations 32 | ts = np.linspace(0.0, 90.0) 33 | ys = soln.x[0] * np.exp(soln.x[1] * ts) 34 | 35 | import matplotlib.pyplot as plt 36 | plt.figure(1) 37 | ax = plt.gca() # current axes 38 | ax.plot(ts, ys, 'k-', label='Model') 39 | ax.plot(tdata, ydata, 'bo', label='Data') 40 | ax.set_xlabel('t') 41 | ax.set_ylabel('y(t)') 42 | ax.legend(loc='upper right') 43 | ax.grid() 44 | plt.show() 45 | 46 | -------------------------------------------------------------------------------- /examples/nonlinear_system.py: -------------------------------------------------------------------------------- 1 | # DFO-LS example: Solving a nonlinear system of equations 2 | # Originally from: 3 | # http://support.sas.com/documentation/cdl/en/imlug/66112/HTML/default/viewer.htm#imlug_genstatexpls_sect004.htm 4 | 5 | from __future__ import print_function 6 | from math import exp 7 | import numpy as np 8 | import dfols 9 | 10 | # Want to solve: 11 | # x1 + x2 - x1*x2 + 2 = 0 12 | # x1 * exp(-x2) - 1 = 0 13 | def nonlinear_system(x): 14 | return np.array([x[0] + x[1] - x[0]*x[1] + 2, 15 | x[0] * exp(-x[1]) - 1.0]) 16 | 17 | # Warning: if there are multiple solutions, which one 18 | # DFO-LS returns will likely depend on x0! 19 | x0 = np.array([0.1, -2.0]) 20 | 21 | # Call DFO-LS 22 | soln = dfols.solve(nonlinear_system, x0) 23 | 24 | # Display output 25 | print(soln) 26 | 27 | -------------------------------------------------------------------------------- /examples/regularized_least_squares.py: -------------------------------------------------------------------------------- 1 | # DFO-LS example: regularized least-squares regression 2 | import numpy as np 3 | import dfols 4 | 5 | # Solve a LASSO problem (linear least-squares + L1 regularizer) 6 | # min_{x} ||Ax-b||_2^2 + lda*||x||_1 7 | # Larger values of lda>0 encourage greater sparsity in the solution x 8 | # (i.e. more entries of x should be zero) 9 | 10 | n = 5 # dimension of x 11 | m = 10 # number of residuals, i.e. dimension of b 12 | 13 | # Generate some artificial data for A and b 14 | A = np.arange(m*n).reshape((m,n)) 15 | b = np.sqrt(np.arange(m)) 16 | objfun = lambda x: A @ x - b # vector of residuals r(x)=Ax-b 17 | 18 | # L1 regularizer: h(x) = lda*||x||_1 for some lda>0 19 | lda = 1.0 20 | h = lambda x: lda * np.linalg.norm(x, 1) 21 | Lh = lda * np.sqrt(n) # Lipschitz constant of h(x) 22 | prox_uh = lambda x, u: np.sign(x) * np.maximum(np.abs(x) - lda*u, 0.0) # proximal operator, prox_{uh}(x) 23 | 24 | 25 | x0 = np.zeros((n,)) # arbitrary starting point 26 | 27 | # Call DFO-LS 28 | soln = dfols.solve(objfun, x0, h=h, lh=Lh, prox_uh=prox_uh) 29 | 30 | # Display output 31 | print(soln) 32 | -------------------------------------------------------------------------------- /examples/rosenbrock_basic.py: -------------------------------------------------------------------------------- 1 | # DFO-LS example: minimize the Rosenbrock function 2 | from __future__ import print_function 3 | import numpy as np 4 | import dfols 5 | 6 | # Define the objective function 7 | def rosenbrock(x): 8 | return np.array([10.0 * (x[1] - x[0] ** 2), 1.0 - x[0]]) 9 | 10 | # Define the starting point 11 | x0 = np.array([-1.2, 1.0]) 12 | 13 | # For optional extra output details 14 | # import logging 15 | # logging.basicConfig(level=logging.INFO, format='%(message)s') 16 | 17 | # Call DFO-LS 18 | soln = dfols.solve(rosenbrock, x0) 19 | 20 | # Display output 21 | print(soln) 22 | 23 | -------------------------------------------------------------------------------- /examples/rosenbrock_bounds.py: -------------------------------------------------------------------------------- 1 | # DFO-LS example: minimize the Rosenbrock function 2 | from __future__ import print_function 3 | import numpy as np 4 | import dfols 5 | 6 | # Define the objective function 7 | def rosenbrock(x): 8 | return np.array([10.0 * (x[1] - x[0] ** 2), 1.0 - x[0]]) 9 | 10 | # Define the starting point 11 | x0 = np.array([-1.2, 1.0]) 12 | 13 | # Define bound constraints (lower <= x <= upper) 14 | lower = np.array([-10.0, -10.0]) 15 | upper = np.array([0.9, 0.85]) 16 | 17 | # For optional extra output details 18 | import logging 19 | logging.basicConfig(level=logging.INFO, format='%(message)s') 20 | 21 | # Call DFO-LS 22 | soln = dfols.solve(rosenbrock, x0, bounds=(lower, upper)) 23 | 24 | # Display output 25 | print(soln) 26 | 27 | -------------------------------------------------------------------------------- /examples/rosenbrock_constrained.py: -------------------------------------------------------------------------------- 1 | # DFO-LS example: minimize the Rosenbrock function with bounds and ball constraint 2 | import numpy as np 3 | import dfols 4 | 5 | # Define the objective function 6 | def rosenbrock(x): 7 | return np.array([10.0 * (x[1] - x[0] ** 2), 1.0 - x[0]]) 8 | 9 | # Define the starting point 10 | x0 = np.array([-1.2, 1]) 11 | 12 | # Define bound constraints (lower <= x <= upper) 13 | lower = np.array([-2.0, 1.1]) 14 | upper = np.array([0.9, 3.0]) 15 | # Note: the corresponding projection operator bound constraints is: 16 | # bounds_proj = lambda x: np.minimum(np.maximum(x, lower), upper) 17 | # but since DFO-LS supports bounds natively, this is not recommended. 18 | 19 | # Define a Euclidean ball constraint, ||x-center|| <= radius 20 | # This is provided to DFO-LS via a projection operator, which given a point x returns 21 | # the closest point to x which satisfies the constraint 22 | center = np.array([0.7, 1.5]) 23 | radius = 0.4 24 | # The projection operator for this constraint is: 25 | ball_proj = lambda x: center + (radius/max(np.linalg.norm(x-center), radius)) * (x-center) 26 | 27 | # Many common types of constraints have simple projection operators. 28 | # e.g. lower/upper bounds (but DFO-LS supports this natively, not recommended to use projections) 29 | # Euclidean balls 30 | # Linear inequalities, np.dot(a, x) >= b 31 | # Unit simplex, np.all(x) >= 0 and np.sum(x) <= 1 32 | # For more examples, see 33 | # - https://proximity-operator.net/indicatorfunctions.html 34 | # - Section 6.4.6 (pp. 155-156) of the book: A. Beck, First-Order Methods in Optimization, SIAM (2017) 35 | 36 | 37 | # For optional extra output details 38 | # import logging 39 | # logging.basicConfig(level=logging.INFO, format='%(message)s') 40 | 41 | # Call DFO-LS 42 | soln = dfols.solve(rosenbrock, x0, bounds=(lower, upper), projections=[ball_proj]) # provide list of projection operators 43 | 44 | # Display output 45 | print(soln) 46 | -------------------------------------------------------------------------------- /examples/rosenbrock_noisy.py: -------------------------------------------------------------------------------- 1 | # DFO-LS example: minimize the Rosenbrock function 2 | from __future__ import print_function 3 | import numpy as np 4 | import dfols 5 | 6 | # Define the objective function 7 | def rosenbrock(x): 8 | return np.array([10.0 * (x[1] - x[0] ** 2), 1.0 - x[0]]) 9 | 10 | # Modified objective function: add 1% Gaussian noise 11 | def rosenbrock_noisy(x): 12 | return rosenbrock(x) * (1.0 + 1e-2 * np.random.normal(size=(2,))) 13 | 14 | # Define the starting point 15 | x0 = np.array([-1.2, 1.0]) 16 | 17 | # Set random seed (for reproducibility) 18 | np.random.seed(0) 19 | 20 | print("Demonstrate noise in function evaluation:") 21 | for i in range(5): 22 | print("objfun(x0) = %s" % str(rosenbrock_noisy(x0))) 23 | print("") 24 | 25 | # Call DFO-LS 26 | #soln = dfols.solve(rosenbrock_noisy, x0) 27 | soln = dfols.solve(rosenbrock_noisy, x0, objfun_has_noise=True) 28 | 29 | # Display output 30 | print(soln) 31 | 32 | # Compare with a derivative-based solver 33 | import scipy.optimize as opt 34 | soln = opt.least_squares(rosenbrock_noisy, x0) 35 | 36 | print("") 37 | print("** SciPy results **") 38 | print("Solution xmin = %s" % str(soln.x)) 39 | print("Objective value f(xmin) = %.10g" % (2.0 * soln.cost)) 40 | print("Needed %g objective evaluations" % soln.nfev) 41 | print("Exit flag = %g" % soln.status) 42 | print(soln.message) 43 | 44 | -------------------------------------------------------------------------------- /manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/numericalalgorithmsgroup/dfols/475149e78c1f5c966db426b03dd231854e26bee2/manual.pdf -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools >= 61.0"] 3 | build-backend = "setuptools.build_meta" 4 | 5 | [project] 6 | name = "DFO-LS" 7 | dynamic = ["version"] 8 | dependencies = [ 9 | "setuptools", 10 | "numpy", 11 | "scipy>=1.11", 12 | "pandas" 13 | ] 14 | requires-python = ">=3.9" 15 | authors = [ 16 | {name = "Lindon Roberts", email = "lindon.roberts@sydney.edu.au"} 17 | ] 18 | maintainers = [ 19 | {name = "Lindon Roberts", email = "lindon.roberts@sydney.edu.au"} 20 | ] 21 | description = "A flexible derivative-free solver for (bound constrained) nonlinear least-squares minimization" 22 | readme = "README.rst" 23 | license = {text = "GPL-3.0-or-later"} 24 | keywords = ["mathematics", "optimization", "least squares", "derivative free optimization", "nonlinear least squares"] 25 | classifiers = [ 26 | "Development Status :: 5 - Production/Stable", 27 | "Environment :: Console", 28 | "Framework :: IPython", 29 | "Framework :: Jupyter", 30 | "Intended Audience :: Science/Research", 31 | "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", 32 | "Operating System :: MacOS", 33 | "Operating System :: Microsoft :: Windows", 34 | "Operating System :: Unix", 35 | "Programming Language :: Python", 36 | "Programming Language :: Python :: 3", 37 | "Programming Language :: Python :: 3.9", 38 | "Programming Language :: Python :: 3.10", 39 | "Programming Language :: Python :: 3.11", 40 | "Programming Language :: Python :: 3.12", 41 | "Topic :: Scientific/Engineering", 42 | "Topic :: Scientific/Engineering :: Mathematics" 43 | ] 44 | 45 | [project.optional-dependencies] 46 | dev = ["pytest", "Sphinx", "sphinx-rtd-theme"] 47 | trustregion = ["trustregion>=1.1"] 48 | 49 | [project.urls] 50 | Homepage = "https://github.com/numericalalgorithmsgroup/dfols" 51 | Download = "https://github.com/numericalalgorithmsgroup/dfols/releases/" 52 | "Bug Tracker" = "https://github.com/numericalalgorithmsgroup/dfols/issues/" 53 | Documentation = "https://numericalalgorithmsgroup.github.io/dfols/" 54 | "Source Code" = "https://github.com/numericalalgorithmsgroup/dfols" 55 | 56 | [tool.setuptools] 57 | packages = ["dfols"] 58 | 59 | [tool.setuptools.dynamic] 60 | version = {attr = "dfols.__version__"} --------------------------------------------------------------------------------