Skip to content

Commit

Permalink
Fix issue DlangScience#38 (Building docs makes complaints)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyllingstad committed Sep 13, 2015
1 parent ccdc560 commit bd39a47
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
34 changes: 21 additions & 13 deletions source/scid/calculus.d
Expand Up @@ -47,21 +47,21 @@
finite differences. The functions in this module use three different
finite-difference formulas: Forward differences,
---
f(x+h) - f(x)
f'(x) = -------------
h
df f(x+h) - f(x)
-- = -------------
dx h
---
backward differences,
---
f(x) - f(x-h)
f'(x) = -------------
h
df f(x) - f(x-h)
-- = -------------
dx h
---
and central differences,
---
f(x+h) - f(x-h)
f'(x) = ---------------
2 h
df f(x+h) - f(x-h)
-- = ---------------
dx 2 h
---
Of these three, the latter is the most accurate, but in the cases where
$(D f(x)) is already known it requires one more function evaluation compared
Expand Down Expand Up @@ -1478,11 +1478,16 @@ unittest
as many function evaluations. The relative accuracy is,
at best, on the order of $(D sqrt(real.epsilon)).
This function is used more or less like $(D jacobian()). The
differences lie in the parameters described below, which
are all optional.
Params:
f = The set of functions. This is typically a function or delegate
which takes a vector as input and returns a vector. If the
function takes a second vector parameter, this is assumed to
be a buffer for the return value, and will be used as such.
m = The number of functions in $(D f).
x = The point at which to take the derivative.
scale = $(D abs(scale)) is the characteristic scale of the
function, and the sign of scale determines which
differentiation method is used. If $(D scale) is
Expand All @@ -1494,6 +1499,9 @@ unittest
Providing this saves one function evaluation if you
for some reason have already calculated the value. (optional)
buffer = A buffer of length at least $(I m)*$(I n), for storing the calculated
Jacobian matrix. (optional)
Examples:
---
// Continuing with the example for the jacobian() function,
Expand Down
1 change: 1 addition & 0 deletions source/scid/ports/minpack/dogleg.d
Expand Up @@ -31,6 +31,7 @@ import scid.ports.minpack.enorm;
Params:
n = a positive integer variable set to the order of R.
r = the upper triangular matrix R.
lr = (not documented)
diag = a vector of length n which must contain the diagonal
elements of the matrix D.
qtb = a vector of length n which must contain the first n
Expand Down
2 changes: 1 addition & 1 deletion source/scid/types.d
Expand Up @@ -200,7 +200,7 @@ pure: // TODO: Mark as nothrow as soon as DMD bug 5191 is fixed (DMD 2.051)
$(UL
$(LI a is infinite, b is finite)
$(LI a is finite, b is infinite)
$(LI a and b are infinite, but have opposite sign.
$(LI a and b are infinite, but have opposite sign.)
)
If T is an integer type, this is always false.
*/
Expand Down

0 comments on commit bd39a47

Please sign in to comment.