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

Method randomize

src/debugging/physicsapps/IsingApp.java:113–128  ·  view source on GitHub ↗

Method randomize

()

Source from the content-addressed store, hash-verified

111 *
112 */
113 public void randomize() {
114 boolean isRunning = animationThread!=null;
115 stopAnimation();
116 randomizeCells();
117 if(isRunning) {
118 startAnimation();
119 } else {
120 enData.clear();
121 magData.clear();
122 time_counter = 0;
123 drawingPanel.invalidateImage();
124 drawingPanel.repaint();
125 enPanel.repaint();
126 magPanel.repaint();
127 }
128 };
129
130 /**
131 * Custom randomizes the spins

Callers

nothing calls this directly

Calls 6

randomizeCellsMethod · 0.95
stopAnimationMethod · 0.65
startAnimationMethod · 0.65
clearMethod · 0.65
repaintMethod · 0.65
invalidateImageMethod · 0.45

Tested by

no test coverage detected