Simulated annealing: Difference between revisions
Content deleted Content added
Line 1,180:
=={{header|Fortran}}==
{{trans|Ada}}
{{works with|gfortran|11.3.0}}
Line 1,528 ⟶ 1,529:
{{out}}
<pre>$ gfortran -std=f2018 -Ofast simanneal.f90 && ./a.out
kT: 1.00
kmax: 1000000
k T E(s)
--------------------------
0 1.0 517.11
100000 0.9 198.12
200000 0.8 169.43
300000 0.7 164.66
400000 0.6 149.10
500000 0.5 138.38
600000 0.4 119.24
700000 0.3 113.69
800000 0.2 105.80
900000 0.1 101.66
1000000 0.0 101.66
0 -> 10 -> 11 -> 21 -> 31 -> 20 -> 30 -> 40 ->
41 -> 51 -> 50 -> 60 -> 70 -> 71 -> 61 -> 62 ->
72 -> 82 -> 81 -> 80 -> 90 -> 91 -> 92 -> 93 ->
83 -> 73 -> 74 -> 84 -> 94 -> 95 -> 96 -> 97 ->
98 -> 99 -> 89 -> 88 -> 79 -> 69 -> 59 -> 58 ->
48 -> 49 -> 39 -> 38 -> 28 -> 29 -> 19 -> 9 ->
8 -> 18 -> 17 -> 7 -> 6 -> 16 -> 15 -> 5 ->
4 -> 14 -> 24 -> 25 -> 26 -> 27 -> 37 -> 36 ->
35 -> 45 -> 46 -> 47 -> 57 -> 67 -> 68 -> 78 ->
77 -> 87 -> 86 -> 85 -> 75 -> 76 -> 66 -> 56 ->
55 -> 65 -> 64 -> 63 -> 54 -> 53 -> 52 -> 42 ->
43 -> 44 -> 34 -> 33 -> 32 -> 22 -> 23 -> 12 ->
13 -> 3 -> 2 -> 1 -> 0
Final E(s): 101.66
</pre>
=={{header|Go}}==
|