Is there a findmin(A) that uses local search instead of visiting all elements of matrix A?

This is a clever solution for handling the boundary. I didn’t realize get worked for arrays. But Inf as default value seems like recipe for type instabilities. How about

get(A, index + d, A[index])

and

get(A, newindex, best) 

?

1 Like