# RRRMC.jl documentation

This code implements the Reduced-Rejection-Rate (RRR) Monte Carlo method for Ising spin models described in the paper "A method to reduce the rejection rate in Monte Carlo Markov Chains" by C. Baldassi, J. Stat. Mech. Theor. Exp., (2017) 3, 033301 doi:10.1088/1742-5468/aa5335 (arXiv).

It also provides:

The code is written in Julia. It requires Julia 1.0.

## Installation

To install the package, use Julia's package manager: from the Julia REPL, type ] to enter the Pkg REPL mode and run:

(v1.3) pkg> add RRRMC

Or, equivalently, via the Pkg API:

julia> import Pkg; Pkg.add("RRRMC")

Dependencies will be installed automatically.

## Usage

The module is loaded as any other Julia module:

julia> using RRRMC

The module provides four functions which implement Monte Carlo Markov Chain algorithms on Ising spin models:

The interface for these four algorithms is documented in the Sampling algorithms page, and it is essentially identical: they take as arguments a graph, an inverse temperature parameter β, and the number of Monte Carlo iterations to perform (or, for wtmMC, of samples to collect). However, the sampling methodology changes based on the type of model, see the Graph types page.

The module also provides the function extremal_opt, which implements the τ-Extremal Optimization heuristic technique, used to seek the ground state of a model. The interface for this function is similar, but not identical, to the others, due to its different purpose.

All of the above functions allow accessing the internal state during the iteration at regular intervals, via the hook keyword argument. They also return the final configuration of the system, which is stored in an object of type Config. (The extremal_opt function also returns the best configuration found.)

The code comes with some built-in graphs, but provides an interface to write user-defined models.

Note

The four sampling functions are the only names exported by the module; all other function and types must be qualified with the RRRMC module name.