Closed
Description
IndexedIter
and IndexedIterMut
should have parallel iterator support.
Often it's desirable to have the element coordinates additionally to the element itself for accessing fields in other arrays. Example use case (part of fluid simulation code):
div.indexed_iter_mut().map(|((y, x), div)| {
*div = -(vel.x[(y, x+1)] - vel.x[(y, x)] + vel.y[(y+1, x)] - vel.y[(y, x)]);
});
I quickly tried to implement it myself, similar to the AxisIter
implementation, but unsure how to properly split the iterator.