MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / getAll

Method getAll

src/org/opensourcephysics/frames/RasterFrame.java:356–363  ·  view source on GitHub ↗

Gets the entire raster contents in an int array Values are in row-major format such that the index corresponds to iy ny+ix. @return array containing entire lattice contents

()

Source from the content-addressed store, hash-verified

354 * @return array containing entire lattice contents
355 */
356 public int[] getAll() {
357 int N = raster.getNx()*raster.getNy();
358 int[] ret = new int[N];
359 for(int i = 0; i<N; i++) {
360 ret[i] = getAtIndex(i);
361 }
362 return ret;
363 }
364
365 /**
366 * Sets an action to toggle the grid betweem the given values when the mouse is pressed.

Callers

nothing calls this directly

Calls 3

getAtIndexMethod · 0.95
getNxMethod · 0.65
getNyMethod · 0.65

Tested by

no test coverage detected