Skip to content

Commit cbecf23

Browse files
authored
searchsortedfirst instead of findfirst in copy_accommodating_diagonals (#198)
1 parent 6d8418a commit cbecf23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BlockSkylineMatrix.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,10 @@ function copy_accommodating_diagonals(A::BlockSkylineMatrix, diagonals::UnitRang
519519
for (j,i) in enumerate(rows)
520520
# First we find which block the j:th element of the main
521521
# diagonal would occupy.
522-
md_block = findfirst((j), ax.lasts)
522+
md_block = searchsortedfirst(blocklasts(ax), j)
523523

524524
# Next we find which block covers row i
525-
d_block = findfirst((i), ax.lasts)
525+
d_block = searchsortedfirst(blocklasts(ax), i)
526526

527527
# Finally, we increase the block-bandwidth as necessary
528528
v[md_block] = max(v[md_block], abs(d_block-md_block))

0 commit comments

Comments
 (0)