Iteration through each element of an Array in "canonical order". The user obtains this by calling getIndexIterator() on an Array. Canonical order for A[i][j][k] has k varying fastest, then j, then i.
Example: Replace array with its square:
IndexIterator iter = A.getIndexIterator(); while (iter.hasNext()) { double val = iter.getDoubleNext(); iter.setDoubleCurrent( val * val); }
Note that canonical order may not be physical order.
@author caron
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.