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.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.

See also inner_graph, delta_energy_residual and update_cache_residual!.

source