Skip to content

Commit 8aaafe6

Browse files
authored
Comment fixes (#249)
1 parent 3e1ee11 commit 8aaafe6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/src/examples/nearest_correlation.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ nothing # hide
4141

4242
X
4343

44-
# The derivative of the projection with respect to increase uniformly the weights
44+
# The derivative of the projection with respect to a uniform increase of the weights
4545
# of the diagonal entries is:
4646

4747
dX
@@ -50,7 +50,7 @@ dX
5050

5151
A = LinearAlgebra.Tridiagonal(-ones(3), 2ones(4), -ones(3))
5252

53-
# The projection is
53+
# The projection is computed as follows:
5454

5555
X, dX = proj(A)
5656
nothing # hide
@@ -59,7 +59,7 @@ nothing # hide
5959

6060
X
6161

62-
# The derivative of the projection with respect to increase uniformly the weights
62+
# The derivative of the projection with respect to a uniform increase of the weights
6363
# of the diagonal entries is:
6464

6565
dX

src/bridges.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ previous column have been found.
276276
Indeed, let `dj` be the `j`th column of `dU`
277277
`dU' * U = vcat(dj'U for j in axes(U, 2))`
278278
Therefore,
279-
`dQ[j, 1:j]` = di'U[:, 1:j] + U[:, j]'dU[:, 1:j]`
279+
`dQ[j, 1:j]` = dj'U[:, 1:j] + U[:, j]'dU[:, 1:j]`
280280
So
281281
`dQ[j, 1:(j-1)] - U[:, j]' * dU[:, 1:(j-1)] = dj'U[:, 1:(j-1)]`
282282
and
283-
`dQ[j, j] / 2 = dj'U[:, 1:(j-1)]`
283+
`dQ[j, j] / 2 = dj'U[:, j]`
284284
"""
285285
function dU_from_dQ!(dQ, U)
286286
n = LinearAlgebra.checksquare(dQ)

0 commit comments

Comments
 (0)