Is there a way to return the query given a index matrix? #1381
-
I am doing a simulation project with the case of advection of the grid-based density field given the velocity. One common way is to perform an inverse advection, and to interpolate densities around. This algorithm basically performs something like below on every grid, where (i,j) is the index of the grid.
So I'm wondering if there is an api
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi there. I don't understand your question - what are |
Beta Was this translation helpful? Give feedback.
You want
Matrix::zip_map
, with something likeI.zip_map(&J, |x, y| M[(x, y)])
.