Infrared
|
Abstract base class for samplers and optimizers. More...
Public Member Functions | |
__init__ (self, model, td_factory=TreeDecompositionFactory(), lazy=True) | |
Construct with model and optional td_factory. | |
requires_reinitialization (self) | |
setup_engine (self, *skip_ct=False) | |
Sets up the constraint model / cluster tree sampling engine. | |
evaluate (self) | |
Evaluates the cluster tree. | |
is_consistent (self) | |
plot_td (self, filename, to="pdf") | |
Plot the tree decomposition to pdf file filename write to filename to target format, support conversion to "pdf" or "png". | |
treewidth (self) | |
Get tree width. | |
gen_cluster_tree (self) | |
Generate the populated cluster tree td tree decomposition Returns cluster tree. | |
Protected Attributes | |
_model | |
_td_factory | |
_td | |
_ct | |
Properties | |
model = property | |
td = property | |
ct = property | |
Abstract base class for samplers and optimizers.
infrared.infrared.EngineBase.__init__ | ( | self, | |
model, | |||
td_factory = TreeDecompositionFactory() , |
|||
lazy = True |
|||
) |
Construct with model and optional td_factory.
model | [const] Constraint network model |
td_factory | Factory for tree decomposition |
lazy | delay construction of the data structures until required |
Reimplemented in infrared.infrared.ArcticOptimizer, infrared.infrared.BoltzmannSampler, and infrared.infrared.MultiDimensionalBoltzmannSampler.
infrared.infrared.EngineBase.evaluate | ( | self | ) |
Evaluates the cluster tree.
infrared.infrared.EngineBase.gen_cluster_tree | ( | self | ) |
Generate the populated cluster tree td tree decomposition Returns cluster tree.
Reimplemented in infrared.infrared.ArcticOptimizer, and infrared.infrared.BoltzmannSampler.
infrared.infrared.EngineBase.is_consistent | ( | self | ) |
infrared.infrared.EngineBase.plot_td | ( | self, | |
filename, | |||
to = "pdf" |
|||
) |
Plot the tree decomposition to pdf file filename write to filename to target format, support conversion to "pdf" or "png".
Anything else writes graphviz dot format
infrared.infrared.EngineBase.requires_reinitialization | ( | self | ) |
infrared.infrared.EngineBase.setup_engine | ( | self, | |
* | skip_ct = False |
||
) |
Sets up the constraint model / cluster tree sampling engine.
skip_ct | skip the potentially expensive construction and evaluation of the cluster tree |
infrared.infrared.EngineBase.treewidth | ( | self | ) |
Get tree width.
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |