Skip to content

Commit

Permalink
Merge pull request #118 from POptUS/formquad_doc
Browse files Browse the repository at this point in the history
Clarifying formquad docstring
  • Loading branch information
jmlarson1 committed Dec 8, 2023
2 parents e32494a + 7c5e29b commit 966def1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pounders/m/formquad.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
% F [dbl] [nf-by-m] Function values of evaluated points
% delta [dbl] Positive trust region radius
% xkin [int] Index in (X and F) of the current center
% npmax [int] Max # interpolation points (>n+1) (.5*(n+1)*(n+2))
% npmax [int] Max # interpolation points (>=n+1) (.5*(n+1)*(n+2))
% Pars(1) [dbl] delta multiplier for checking validity
% Pars(2) [dbl] delta multiplier for all interpolation points
% Pars(3) [dbl] Pivot threshold for validity
Expand All @@ -28,8 +28,8 @@
% Mdir [dbl] [(n-np+1)-by-n] Unit directions to improve model
% np [int] Number of interpolation points (=length(Mind))
% valid [log] Flag saying if model is valid within Pars(2)*delta
% G [dbl] [n-by-m] Matrix of model gradients at Xk
% H [dbl] [n-by-n-by-m] Array of model Hessians at Xk
% G [dbl] [n-by-m] Matrix of model gradients at centered at X(xkin, :)
% H [dbl] [n-by-n-by-m] Array of model Hessians centered at X(xkin, :)
% Mind [int] [npmax-by-1] Integer vector of model interpolation indices
%
function [Mdir, np, valid, G, H, Mind] = formquad(X, F, delta, xkin, npmax, Pars, vf)
Expand Down
6 changes: 3 additions & 3 deletions pounders/py/formquad.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def formquad(X, F, delta, xkin, npmax, Pars, vf):
F [dbl] [nf-by-m] Function values of evaluated points
delta [dbl] Positive trust region radius
xkin [int] Index in (X and F) of the current center
npmax [int] Max # interpolation points (>n+1) (.5*(n+1)*(n+2))
npmax [int] Max # interpolation points (>=n+1) (.5*(n+1)*(n+2))
Pars[0] [dbl] delta multiplier for checking validity
Pars[1] [dbl] delta multiplier for all interpolation points
Pars[2] [dbl] Pivot threshold for validity
Expand All @@ -33,8 +33,8 @@ def formquad(X, F, delta, xkin, npmax, Pars, vf):
Mdir [dbl] [(n-np+1)-by-n] Unit directions to improve model
np [int] Number of interpolation points (=length(Mind))
valid [log] Flag saying if model is valid within Pars[2]*delta
G [dbl] [n-by-m] Matrix of model gradients at Xk
H [dbl] [n-by-n-by-m] Array of model Hessians at Xk
G [dbl] [n-by-m] Matrix of model gradients centered at X[xkin]
H [dbl] [n-by-n-by-m] Array of model Hessians centered at X[xkin]
Mind [int] [npmax-by-1] Integer vector of model interpolation indices
"""
# % --DEPENDS ON-------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pounders/py/pounders.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def pounders(fun, X0, n, npmax, nfmax, gtol, delta, nfs, m, F0, xkin, L, U, prin
fun [f h] Function handle so that fun(x) evaluates F (@calfun)
X0 [dbl] [max(nfs,1)-by-n] Set of initial points (zeros(1,n))
n [int] Dimension (number of continuous variables)
npmax [int] Maximum number of interpolation points (>n+1) (2*n+1)
npmax [int] Maximum number of interpolation points (>=n+1) (2*n+1)
nfmax [int] Maximum number of function evaluations (>n+1) (100)
gtol [dbl] Tolerance for the 2-norm of the model gradient (1e-4)
delta [dbl] Positive trust region radius (.1)
Expand Down

0 comments on commit 966def1

Please sign in to comment.