Skip to content

Commit 678f9d3

Browse files
committed
Reverse indexation.
1 parent f555745 commit 678f9d3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/models/solve_allocation_by_duality.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function hessian_duality(
181181
ind = 0
182182

183183
# https://stackoverflow.com/questions/38901275/inbounds-propagation-rules-in-julia
184-
@inbounds for (jdnd, jn) in zip(hess_str[1], hess_str[2])
184+
@inbounds for (jdnd, jn) in zip(hess_str[2], hess_str[1])
185185
ind += 1
186186
# First get the indices of the element and the respective derivative
187187
j = (jn-1) % J + 1

src/models/solve_allocation_by_duality_cgc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function hessian_duality_cgc(
168168
ind = 0
169169

170170
# https://stackoverflow.com/questions/38901275/inbounds-propagation-rules-in-julia
171-
@inbounds for (jdnd, jn) in zip(hess_str[1], hess_str[2])
171+
@inbounds for (jdnd, jn) in zip(hess_str[2], hess_str[1])
172172
ind += 1
173173
# First get the indices of the element and the respective derivative
174174
j = (jn-1) % J + 1

0 commit comments

Comments
 (0)