summaryrefslogtreecommitdiff
path: root/doc/examples.rst
blob: 9f07d6714f2e698e459f252a69f110ac0e0d66b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

********
Examples
********

Several examples are included in the directory :file:`examples/`, including using site dependent fields, compiling without a field, using the same spin type for multiple transformation types, and more.

The simplist, standalone example :file:`examples/ising_standalone.cpp` of measuring the average cluster size of an Ising model is provided in full below, demonstrating how to define a model, measurement, couplings, and initialize the algorithm.

.. literalinclude:: ../examples/ising_standalone.cpp
   :language: cpp