Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| exercise:prog:spinglass [2020/09/01 06:12] – [System representation] chunchung | exercise:prog:spinglass [2020/11/06 03:15] (current) – [System representation] chunchung | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| </ | </ | ||
| Since the coupling involves two spins, it is instinctive to use a two-dimensional array for '' | Since the coupling involves two spins, it is instinctive to use a two-dimensional array for '' | ||
| + | |||
| + | Since we are using %%C++%%, we will use the '' | ||
| + | <code c++> | ||
| + | std:: | ||
| + | std:: | ||
| + | std:: | ||
| + | </ | ||
| + | For couplings, we use '' | ||
| + | <code c++> | ||
| + | struct Link { | ||
| + | int n0; | ||
| + | int n1; | ||
| + | }; | ||
| + | std:: | ||
| + | </ | ||
| + | |||
| =====Data storage===== | =====Data storage===== | ||
| For portability of data, we use [[https:// | For portability of data, we use [[https:// | ||
