Custom randomizes the spins
()
| 131 | * Custom randomizes the spins |
| 132 | */ |
| 133 | private void randomizeCells() { |
| 134 | for(int i = 0; i<size; i++) { |
| 135 | for(int j = 0; j<size; j++) { |
| 136 | if(Math.random()>0.5) { |
| 137 | spinData[i][j] = 1; |
| 138 | } else { |
| 139 | spinData[i][j] = -1; |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 | lattice.setBlock(0, 0, spinData); |
| 144 | getME(); |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * Set the parameters in the calculation. |
no test coverage detected