# Graph types

All graphs which can be used with the sampling algorithms belong to a type hierarchy. At the top of the hierarchy, there is AbstractGraph:

There are currently three abstract subclasses and an alias, which determine how the sampling algorithms can be used:

RRRMC.Interface.DiscrGraphType
DiscrGraph{ET} <: AbstractGraph{ET}

An abstract type representing a graph in which the delta_energy values produced when flipping a spin belong to a finite discrete set, and thus can be sampled more efficiently with rrrMC or bklMC if the set is small.

The ET parameter is the type returned by energy and delta_energy.

See also allΔE.

source
RRRMC.Interface.DoubleGraphType
DoubleGraph{GT<:SingleGraph,ET} <: AbstractGraph{ET}

An abstract type representing a graph in which the energy is the sum of two contributions, one of which is encoded in a graph of type GT (see SingleGraph). This allows rrrMC to sample values more efficiently.

The ET parameter is the type returned by the energy and delta_energy functions. Note that it can be different from the energy type of the internal GT object (e.g., one can have a DoubleGraph{DiscrGraph{Int},Float64} object).

Note: When you declare a type as subtype of this, GT should not be the concrete type of the inner graph, but either SimpleGraph{T} or DiscrGraph{T} for some T.

source