summaryrefslogtreecommitdiff
path: root/doc/system.rst
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-01-14 15:47:59 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-01-14 15:47:59 -0500
commit49ac78a6c04e215950bc9c0f97368605e63da15b (patch)
tree64b770c543a0c90bc7dcbc06ceaaa31e96e541ce /doc/system.rst
parent994cbf1a3b611ff4c94ced3b1630e51fd249d7ed (diff)
downloadc++-49ac78a6c04e215950bc9c0f97368605e63da15b.tar.gz
c++-49ac78a6c04e215950bc9c0f97368605e63da15b.tar.bz2
c++-49ac78a6c04e215950bc9c0f97368605e63da15b.zip
Large refactoring around changes in the graph class.
- Graphs now use lists of references instead of vectors of indicies. - Vertices and edges have associated classes that can be given arbitrary properties via template specification. - All essential library headers have been combined into one, wolff.hpp.
Diffstat (limited to 'doc/system.rst')
-rw-r--r--doc/system.rst30
1 files changed, 15 insertions, 15 deletions
diff --git a/doc/system.rst b/doc/system.rst
index 928d85b..9cd4a90 100644
--- a/doc/system.rst
+++ b/doc/system.rst
@@ -5,25 +5,25 @@
Constructing a System & Running Wolff
*************************************
-This class and associated member functions are defined in the header files :file:`wolff.hpp`, :file:`wolff/system.hpp`, and :file:`wolff/cluster.hpp`.
+This class and associated member functions are defined in the header file :file:`lib/wolff.hpp`.
-.. class:: template\<R_t, X_t> system
+.. class:: template\<R_t, X_t, G_t = graph\<>> system
The core of the library lies in the :class:`system` class and its member functions. Here, the state of your model is stored and cluster flip Monte Carlo can be carried out in various ways.
Note that the member objects and functions described here will change when compiled with certain compiler flags active, as described in :ref:`compile`.
- .. member:: v_t system::nv
+ .. member:: unsigned system::nv
Stores the number of ordinary sites in the model.
- .. member:: v_t system::ne
+ .. member:: unsigned system::ne
Stores the number of ordinary bonds in the model.
- .. member:: graph system::G
+ .. member:: G_t system::G
- Stores the graph describing the lattice, including the ghost site.
+ Stores the graph describing the lattice, including the ghost site. See :ref:`graphs` for details on this class. The template parameter has a default option corresponding to a graph type with no special vertex or edge properties.
.. member:: double system::T
@@ -45,33 +45,33 @@ This class and associated member functions are defined in the header files :file
The function that returns the coupling to the field.
- .. function:: system::system(graph G, double T, std::function <double(const X_t&, const X_t&)> Z, std::function <double(const X_t&)> B)
+ .. function:: system::system(G_t G, double T, std::function <double(const X_t&, const X_t&)> Z, std::function <double(const X_t&)> B)
The constructor for systems.
- :param graph G: A lattice graph *without* the ghost spin added.
+ :param G_t G: A lattice graph *without* the ghost spin added.
:param double T: The temperature.
:param std\:\:function<double(const X_t&, const X_t&)> Z: The bond coupling.
:param std\:\:function<double(const X_t&)> B: The field coupling.
The states of the spins and ghost site are initialized using the default constructors for :type:`X_t` and :type:`R_t`, respectively. :any:`nv` and :any:`ne` are taken directly from :any:`G`, after which the ghost site is added to :any:`G`.
- .. function:: system::flip_cluster(v_t i0, const R_t& r, std::mt19937& rng, measurement<R_t, X_t>& A)
+ .. function:: system::flip_cluster(const G_t::vertex& v0, const R_t& r, std::mt19937& rng, measurement<R_t, X_t, G_t>& A)
Performs one Wolff cluster flip to the system.
- :param v_t i0: The index of the seed site.
+ :param const G_t\:\:vertex& v0: The vertex of the seed site.
:param const R_t& r: The transformation by which the cluster is flipped.
:param std\:\:mt19937& rng: A random number generator.
- :param measurement<R_t, X_t>& A: Object whose class inherits :class:`measurement` and provides relevant measurement hooks.
+ :param measurement<R_t, X_t, G_t>& A: Object whose class inherits :class:`measurement` and provides relevant measurement hooks.
- .. function:: system::run_wolff(N_t N, std::function <R_t(std::mt19937&, const system<R_t, X_t>&, v_t)> r_gen, measurement<R_t, X_t>& A, std::mt19937& rng)
+ .. function:: system::run_wolff(unsigned N, std::function <R_t(std::mt19937&, const system<R_t, X_t, G_t>&, const G_t::vertex&)> r_gen, measurement<R_t, X_t, G_t>& A, std::mt19937& rng)
Performs :any:`N` Wolff cluster flips to the system.
- :param N_t N: Number of clusters to flip.
- :param std\:\:function <R_t(std\:\:mt19937&, const system<R_t, X_t>&, v_t>)> r_gen: Generator of transformations for the cluster flips.
- :param measurement<R_t, X_t>& A: Object whose class inherits :class:`measurement` and provides relevant measurement hooks.
+ :param unsigned N: Number of clusters to flip.
+ :param std\:\:function <R_t(std\:\:mt19937&, const system<R_t, X_t, G_t>&, const G_t\:\:vertex&>)> r_gen: Generator of transformations for the cluster flips.
+ :param measurement<R_t, X_t, G_t>& A: Object whose class inherits :class:`measurement` and provides relevant measurement hooks.
:param std\:\:mt19937& rng: A random number generator.