aGrUM  0.16.0
gum::DefaultEliminationSequenceStrategy Class Reference

An efficient unconstrained elimination sequence algorithm. More...

#include <defaultEliminationSequenceStrategy.h>

+ Inheritance diagram for gum::DefaultEliminationSequenceStrategy:
+ Collaboration diagram for gum::DefaultEliminationSequenceStrategy:

Public Member Functions

Constructors / Destructors
 DefaultEliminationSequenceStrategy (double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
 default constructor (uses an empty graph) More...
 
 DefaultEliminationSequenceStrategy (UndiGraph *graph, const NodeProperty< Size > *dom_sizes, double ratio=GUM_QUASI_RATIO, double threshold=GUM_WEIGHT_THRESHOLD)
 constructor for an a priori non empty graph More...
 
 DefaultEliminationSequenceStrategy (const DefaultEliminationSequenceStrategy &from)
 copy constructor More...
 
 DefaultEliminationSequenceStrategy (DefaultEliminationSequenceStrategy &&)
 move constructor More...
 
virtual ~DefaultEliminationSequenceStrategy ()
 destructor More...
 
virtual DefaultEliminationSequenceStrategynewFactory () const final
 creates a new elimination sequence of the same type as the current object, but this sequence contains only an empty graph More...
 
virtual DefaultEliminationSequenceStrategycopyFactory () const final
 virtual copy constructor More...
 
Accessors / Modifiers
virtual bool setGraph (UndiGraph *graph, const NodeProperty< Size > *dom_sizes) final
 sets a new graph to be triangulated More...
 
virtual void clear () final
 clears the sequence (to prepare, for instance, a new elimination sequence) More...
 
virtual NodeId nextNodeToEliminate () final
 returns the new node to be eliminated within the triangulation algorithm More...
 
virtual void askFillIns (bool do_it) final
 if the elimination sequence is able to compute fill-ins, we indicate whether we want this feature to be activated More...
 
virtual bool providesFillIns () const final
 indicates whether the fill-ins generated by the eliminated nodes, if needed, will be computed by the elimination sequence, or need be computed by the triangulation itself. More...
 
virtual bool providesGraphUpdate () const final
 indicates whether the elimination sequence updates by itself the graph after a node has been eliminated More...
 
virtual void eliminationUpdate (const NodeId node) final
 performs all the graph/fill-ins updates provided (if any) More...
 
virtual const EdgeSetfillIns () final
 in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so far More...
 
Accessors / Modifiers
UndiGraphgraph () const noexcept
 returns the current graph More...
 
const NodeProperty< Size > * domainSizes () const noexcept
 returns the current domain sizes More...
 

Protected Attributes

UndiGraph_graph {nullptr}
 the graph to be triangulated More...
 
const NodeProperty< Size > * _domain_sizes {nullptr}
 the domain sizes of the variables/nodes More...
 
NodeProperty< double_log_domain_sizes
 the log of the domain sizes of the variables/nodes More...
 

Detailed Description

An efficient unconstrained elimination sequence algorithm.

Class DefaultEliminationSequenceStrategy implements an unconstrained elimination sequence algorithm (that is, there is no external constraint on the possible elimination ordering). The ordering is determined as follows:

the nodes that are simplicial (i.e., those that already form a clique

with their neighbors) are eliminated first

then the nodes that are almost simplicial (i.e., if we remove one of

their neighbors, they become simplicial) and that create small cliques,

are eliminated

the quasi simplicial nodes (i.e., the nodes that do not require many

fill-ins to create cliques) that would create small cliques, are eliminated

finally, the heuristic proposed by Kjaerulff(90) is used to compute the

last nodes to be eliminated.

Definition at line 76 of file defaultEliminationSequenceStrategy.h.

Constructor & Destructor Documentation

◆ DefaultEliminationSequenceStrategy() [1/4]

gum::DefaultEliminationSequenceStrategy::DefaultEliminationSequenceStrategy ( double  theRatio = GUM_QUASI_RATIO,
double  theThreshold = GUM_WEIGHT_THRESHOLD 
)

default constructor (uses an empty graph)

Parameters
theRatiothe ratio used by the SimplicialSet included in the DefaultEliminationSequenceStrategy
theThresholdthe weight threshhold of the SimplicialSet included in the DefaultEliminationSequenceStrategy

Definition at line 36 of file defaultEliminationSequenceStrategy.cpp.

Referenced by copyFactory(), and newFactory().

37  :
38  __simplicial_ratio(theRatio),
39  __simplicial_threshold(theThreshold) {
40  // for debugging purposes
41  GUM_CONSTRUCTOR(DefaultEliminationSequenceStrategy);
42  }
DefaultEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
double __simplicial_ratio
the ratio used by __simplicial_set for its quasi-simplicial nodes
double __simplicial_threshold
the threshold used by __simplicial_set to determine small cliques
+ Here is the caller graph for this function:

◆ DefaultEliminationSequenceStrategy() [2/4]

gum::DefaultEliminationSequenceStrategy::DefaultEliminationSequenceStrategy ( UndiGraph graph,
const NodeProperty< Size > *  dom_sizes,
double  ratio = GUM_QUASI_RATIO,
double  threshold = GUM_WEIGHT_THRESHOLD 
)

constructor for an a priori non empty graph

Parameters
graphthe graph to be triangulated, i.e., the nodes of which will be eliminated
dom_sizesthe domain sizes of the nodes to be eliminated
ratiothe ratio used by the SimplicialSet included in the DefaultEliminationSequenceStrategy
thresholdthe weight threshhold of the SimplicialSet included in the DefaultEliminationSequenceStrategy
Warning
Note that we allow dom_sizes to be defined over nodes/variables that do not belong to graph. These sizes will simply be ignored. However, it is compulsory that all the nodes of graph belong to dom_sizes
the graph is altered during the triangulation.
note that, by aGrUM's rule, the graph and the domain sizes are not copied but only referenced by the elimination sequence algorithm.

Definition at line 45 of file defaultEliminationSequenceStrategy.cpp.

References setGraph().

49  :
50  __simplicial_ratio(ratio),
51  __simplicial_threshold(threshold) {
52  setGraph(graph, domain_sizes);
53 
54  // for debugging purposes
55  GUM_CONSTRUCTOR(DefaultEliminationSequenceStrategy);
56  }
DefaultEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
double __simplicial_ratio
the ratio used by __simplicial_set for its quasi-simplicial nodes
UndiGraph * graph() const noexcept
returns the current graph
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes) final
sets a new graph to be triangulated
double __simplicial_threshold
the threshold used by __simplicial_set to determine small cliques
+ Here is the call graph for this function:

◆ DefaultEliminationSequenceStrategy() [3/4]

gum::DefaultEliminationSequenceStrategy::DefaultEliminationSequenceStrategy ( const DefaultEliminationSequenceStrategy from)

copy constructor

Warning
The newly created elimination sequence strategy points toward the same undirected graph as the one contained in from but each strategy possesses its own simplicial set. As a result, if both elimination strategies are used at the same time, they will probably result in a mess because their simplicial sets won't be synchronized correctly with the changing undirected graph. So, whenever using this copy constructor, be sure that either from or the newly created strategy is used for a triangulation but not both. This will necessarily be OK in DefaultTriangulations.

Definition at line 59 of file defaultEliminationSequenceStrategy.cpp.

60  :
62  // no need to set __log_weights because the copy of the simplicial set
63  // will set it properly
64  __simplicial_set(new SimplicialSet(*from.__simplicial_set,
65  _graph,
68  false)),
69  __simplicial_ratio(from.__simplicial_ratio),
70  __simplicial_threshold(from.__simplicial_threshold),
71  __provide_fill_ins(from.__provide_fill_ins) {
72  // for debugging purposes
74  }
NodeProperty< double > __log_weights
for each node, the weight of the clique created by the node&#39;s elimination
UndiGraph * _graph
the graph to be triangulated
NodeProperty< double > _log_domain_sizes
the log of the domain sizes of the variables/nodes
DefaultEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
double __simplicial_ratio
the ratio used by __simplicial_set for its quasi-simplicial nodes
bool __provide_fill_ins
indicates whether we compute new fill-ins
double __simplicial_threshold
the threshold used by __simplicial_set to determine small cliques

◆ DefaultEliminationSequenceStrategy() [4/4]

gum::DefaultEliminationSequenceStrategy::DefaultEliminationSequenceStrategy ( DefaultEliminationSequenceStrategy &&  from)

move constructor

Definition at line 77 of file defaultEliminationSequenceStrategy.cpp.

References __log_weights, __simplicial_set, and gum::SimplicialSet::replaceLogWeights().

78  :
80  __log_weights(std::move(from.__log_weights)),
81  __simplicial_set(from.__simplicial_set),
82  __simplicial_ratio(from.__simplicial_ratio),
83  __simplicial_threshold(from.__simplicial_threshold),
84  __provide_fill_ins(from.__provide_fill_ins) {
85  __simplicial_set->replaceLogWeights(&from.__log_weights, &__log_weights);
86  from.__simplicial_set = nullptr;
87 
88  // for debugging purposes
90  }
NodeProperty< double > __log_weights
for each node, the weight of the clique created by the node&#39;s elimination
void replaceLogWeights(NodeProperty< double > *old_weigths, NodeProperty< double > *new_weights)
reassigns a new set of cliques&#39; log weights (with the same content)
DefaultEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
double __simplicial_ratio
the ratio used by __simplicial_set for its quasi-simplicial nodes
bool __provide_fill_ins
indicates whether we compute new fill-ins
double __simplicial_threshold
the threshold used by __simplicial_set to determine small cliques
+ Here is the call graph for this function:

◆ ~DefaultEliminationSequenceStrategy()

gum::DefaultEliminationSequenceStrategy::~DefaultEliminationSequenceStrategy ( )
virtual

destructor

Definition at line 93 of file defaultEliminationSequenceStrategy.cpp.

References __simplicial_set.

93  {
94  // for debugging purposes
95  GUM_DESTRUCTOR(DefaultEliminationSequenceStrategy);
96 
97  if (__simplicial_set != nullptr) delete __simplicial_set;
98  }
DefaultEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate

Member Function Documentation

◆ __createSimplicialSet()

void gum::DefaultEliminationSequenceStrategy::__createSimplicialSet ( )
private

create a new simplicial set suited for the current graph

Definition at line 115 of file defaultEliminationSequenceStrategy.cpp.

References __log_weights, __provide_fill_ins, __simplicial_ratio, __simplicial_set, __simplicial_threshold, gum::EliminationSequenceStrategy::_graph, gum::EliminationSequenceStrategy::_log_domain_sizes, and gum::SimplicialSet::setFillIns().

Referenced by setGraph().

115  {
116  // remove the old simplicial set, if any
117  if (__simplicial_set != nullptr) {
118  delete __simplicial_set;
119  __simplicial_set = nullptr;
120  }
121 
122  if (_graph != nullptr) {
123  // create a simplicial set suited for the graph
124  __simplicial_set = new SimplicialSet(_graph,
126  &__log_weights,
129 
131  }
132  }
NodeProperty< double > __log_weights
for each node, the weight of the clique created by the node&#39;s elimination
UndiGraph * _graph
the graph to be triangulated
NodeProperty< double > _log_domain_sizes
the log of the domain sizes of the variables/nodes
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
double __simplicial_ratio
the ratio used by __simplicial_set for its quasi-simplicial nodes
bool __provide_fill_ins
indicates whether we compute new fill-ins
void setFillIns(bool on_off)
sets/unset the fill-ins storage in the standard triangulation procedure
double __simplicial_threshold
the threshold used by __simplicial_set to determine small cliques
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ askFillIns()

void gum::DefaultEliminationSequenceStrategy::askFillIns ( bool  do_it)
finalvirtual

if the elimination sequence is able to compute fill-ins, we indicate whether we want this feature to be activated

Parameters
do_itwhen true and the elimination sequence has the ability to compute fill-ins, the elimination sequence will actually compute them (for the triangulation to use them), else they will not be available.

Implements gum::EliminationSequenceStrategy.

Definition at line 194 of file defaultEliminationSequenceStrategy.cpp.

References __provide_fill_ins, __simplicial_set, and gum::SimplicialSet::setFillIns().

194  {
195  __provide_fill_ins = do_it;
196 
197  if (__simplicial_set != nullptr)
199  }
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
bool __provide_fill_ins
indicates whether we compute new fill-ins
void setFillIns(bool on_off)
sets/unset the fill-ins storage in the standard triangulation procedure
+ Here is the call graph for this function:

◆ clear()

void gum::DefaultEliminationSequenceStrategy::clear ( )
finalvirtual

clears the sequence (to prepare, for instance, a new elimination sequence)

Reimplemented from gum::EliminationSequenceStrategy.

Definition at line 146 of file defaultEliminationSequenceStrategy.cpp.

References __log_weights, __simplicial_set, and gum::EliminationSequenceStrategy::clear().

146  {
148 
149  __log_weights.clear();
150  if (__simplicial_set != nullptr) {
151  delete __simplicial_set;
152  __simplicial_set = nullptr;
153  }
154  }
virtual void clear()
clears the sequence (to prepare, for instance, a new elimination sequence)
NodeProperty< double > __log_weights
for each node, the weight of the clique created by the node&#39;s elimination
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
+ Here is the call graph for this function:

◆ copyFactory()

DefaultEliminationSequenceStrategy * gum::DefaultEliminationSequenceStrategy::copyFactory ( ) const
finalvirtual

virtual copy constructor

Warning
The newly created elimination sequence strategy points toward the same undirected graph as the one contained in the current strategy but each strategy possesses its own simplicial set. As a result, if both elimination strategies are used at the same time, they will probably result in a mess because their simplicial sets won't be synchronized correctly with the changing undirected graph. So, whenever using this virtual copy constructor, be sure that either the current or the newly created strategy is used for a triangulation but not both. This will necessarily be OK in DefaultTriangulations.

Implements gum::UnconstrainedEliminationSequenceStrategy.

Definition at line 110 of file defaultEliminationSequenceStrategy.cpp.

References DefaultEliminationSequenceStrategy().

110  {
111  return new DefaultEliminationSequenceStrategy(*this);
112  }
DefaultEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
+ Here is the call graph for this function:

◆ domainSizes()

INLINE const NodeProperty< Size > * gum::EliminationSequenceStrategy::domainSizes ( ) const
noexceptinherited

returns the current domain sizes

Definition at line 44 of file eliminationSequenceStrategy_inl.h.

References gum::EliminationSequenceStrategy::_domain_sizes.

44  {
45  return _domain_sizes;
46  }
const NodeProperty< Size > * _domain_sizes
the domain sizes of the variables/nodes

◆ eliminationUpdate()

void gum::DefaultEliminationSequenceStrategy::eliminationUpdate ( const NodeId  node)
finalvirtual

performs all the graph/fill-ins updates provided (if any)

performs all the graph/fill-ins updates provided

Parameters
nodethe node the elimination of which requires the graph update

Reimplemented from gum::EliminationSequenceStrategy.

Definition at line 215 of file defaultEliminationSequenceStrategy.cpp.

References __simplicial_set, gum::SimplicialSet::eraseClique(), and gum::SimplicialSet::makeClique().

215  {
216  if (__simplicial_set != nullptr) {
219  }
220  }
void makeClique(const NodeId id)
adds the necessary edges so that node &#39;id&#39; and its neighbors form a clique
void eraseClique(const NodeId id)
removes a node and its adjacent edges from the underlying graph
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
+ Here is the call graph for this function:

◆ fillIns()

const EdgeSet & gum::DefaultEliminationSequenceStrategy::fillIns ( )
finalvirtual

in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so far

in case fill-ins are provided, this function returns the fill-ins generated after the last node elimination

Reimplemented from gum::EliminationSequenceStrategy.

Definition at line 224 of file defaultEliminationSequenceStrategy.cpp.

References __provide_fill_ins, __simplicial_set, gum::EliminationSequenceStrategy::fillIns(), and gum::SimplicialSet::fillIns().

224  {
225  if (!__provide_fill_ins || (__simplicial_set == nullptr))
227  else
228  return __simplicial_set->fillIns();
229  }
virtual const EdgeSet & fillIns()
in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so ...
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
bool __provide_fill_ins
indicates whether we compute new fill-ins
const EdgeSet & fillIns() const
returns the set of all the fill-ins added to the graph so far
+ Here is the call graph for this function:

◆ graph()

INLINE UndiGraph * gum::EliminationSequenceStrategy::graph ( ) const
noexceptinherited

returns the current graph

Definition at line 37 of file eliminationSequenceStrategy_inl.h.

References gum::EliminationSequenceStrategy::_graph.

Referenced by gum::EliminationSequenceStrategy::setGraph().

37  {
38  return _graph;
39  }
UndiGraph * _graph
the graph to be triangulated
+ Here is the caller graph for this function:

◆ newFactory()

DefaultEliminationSequenceStrategy * gum::DefaultEliminationSequenceStrategy::newFactory ( ) const
finalvirtual

creates a new elimination sequence of the same type as the current object, but this sequence contains only an empty graph

Warning
you must deallocate by yourself the object returned
Returns
an empty clone of the current object with the same type

Implements gum::UnconstrainedEliminationSequenceStrategy.

Definition at line 103 of file defaultEliminationSequenceStrategy.cpp.

References __simplicial_ratio, __simplicial_threshold, and DefaultEliminationSequenceStrategy().

103  {
106  }
DefaultEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
double __simplicial_ratio
the ratio used by __simplicial_set for its quasi-simplicial nodes
double __simplicial_threshold
the threshold used by __simplicial_set to determine small cliques
+ Here is the call graph for this function:

◆ nextNodeToEliminate()

NodeId gum::DefaultEliminationSequenceStrategy::nextNodeToEliminate ( )
finalvirtual

returns the new node to be eliminated within the triangulation algorithm

Exceptions
NotFoundexception is thrown if there is no more node to eliminate in the graph

Implements gum::EliminationSequenceStrategy.

Definition at line 157 of file defaultEliminationSequenceStrategy.cpp.

References __log_weights, __simplicial_set, gum::EliminationSequenceStrategy::_graph, gum::SimplicialSet::bestAlmostSimplicialNode(), gum::SimplicialSet::bestQuasiSimplicialNode(), gum::SimplicialSet::bestSimplicialNode(), GUM_ERROR, gum::SimplicialSet::hasAlmostSimplicialNode(), gum::SimplicialSet::hasQuasiSimplicialNode(), and gum::SimplicialSet::hasSimplicialNode().

157  {
158  // if there is no simplicial set, send an exception
159  if (_graph == nullptr) { GUM_ERROR(NotFound, "the graph is empty"); }
160 
161  // select a node to be eliminated: try simplicial nodes, then almost
162  // simplicial nodes, then quasi-simplicial nodes
163  // note that if __graph != 0, __simplicial_set has been allocated
170  else {
171  // here: select the node through Kjaerulff's heuristic
172  auto iter_heuristic = __log_weights.cbegin();
173 
174  if (iter_heuristic == __log_weights.cend())
175  GUM_ERROR(NotFound, "there exists no more node to eliminate");
176 
177  double min_weight = iter_heuristic.val();
178  NodeId removable_node = iter_heuristic.key();
179  for (++iter_heuristic; iter_heuristic != __log_weights.cend();
180  ++iter_heuristic) {
181  if (iter_heuristic.val() < min_weight) {
182  removable_node = iter_heuristic.key();
183  min_weight = iter_heuristic.val();
184  }
185  }
186 
187  return removable_node;
188  }
189  }
NodeId bestQuasiSimplicialNode()
gets a quasi simplicial node with the lowest clique weight
NodeProperty< double > __log_weights
for each node, the weight of the clique created by the node&#39;s elimination
UndiGraph * _graph
the graph to be triangulated
bool hasQuasiSimplicialNode()
indicates whether there exists a quasi simplicial node
bool hasAlmostSimplicialNode()
indicates whether there exists an almost simplicial node
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
bool hasSimplicialNode()
indicates whether there exists a simplicial node
NodeId bestAlmostSimplicialNode()
gets the almost simplicial node with the lowest clique weight
NodeId bestSimplicialNode()
returns the simplicial node with the lowest clique weight
Size NodeId
Type for node ids.
Definition: graphElements.h:98
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55
+ Here is the call graph for this function:

◆ providesFillIns()

bool gum::DefaultEliminationSequenceStrategy::providesFillIns ( ) const
finalvirtual

indicates whether the fill-ins generated by the eliminated nodes, if needed, will be computed by the elimination sequence, or need be computed by the triangulation itself.

indicates whether the new fill-ins generated by a new eliminated node, if needed, will be computed by the elimination sequence, or need be computed by the triangulation itself.

An elimination sequence provides fill-ins to its triangulation if and only if it has the ability to compute them and it has been asked to do so (by method askFillIns)

Implements gum::EliminationSequenceStrategy.

Definition at line 204 of file defaultEliminationSequenceStrategy.cpp.

References __provide_fill_ins.

204  {
205  return __provide_fill_ins;
206  }
bool __provide_fill_ins
indicates whether we compute new fill-ins

◆ providesGraphUpdate()

bool gum::DefaultEliminationSequenceStrategy::providesGraphUpdate ( ) const
finalvirtual

indicates whether the elimination sequence updates by itself the graph after a node has been eliminated

Some algorithms have more informations than the triangulation algorithm to update the graph after a node has been eliminated. They can thus exploit these informations to update the graph faster than the triangulation. Hence the latter should delegate this operation to the elimination sequence. This is the case, for instance, for the defaultEliminationSequence, which uses a SimplicialSet that knows that some eliminated nodes do not require any fill-in.

Implements gum::EliminationSequenceStrategy.

Definition at line 210 of file defaultEliminationSequenceStrategy.cpp.

210  {
211  return true;
212  }

◆ setGraph()

bool gum::DefaultEliminationSequenceStrategy::setGraph ( UndiGraph graph,
const NodeProperty< Size > *  dom_sizes 
)
finalvirtual

sets a new graph to be triangulated

The elimination sequence algorithm reinitializes its data to start a new triangulation with Graph "graph"

Parameters
graphthe new graph to be triangulated
dom_sizesthe domain sizes of the variables/nodes
Returns
true if the data structures were modified (if the graph or the
Warning
Note that we allow dom_sizes to be defined over nodes/variables that do not belong to graph. These sizes will simply be ignored. However, it is compulsory that all the nodes of graph belong to dom_sizes
the graph is altered during the triangulation.
note that, by aGrUM's rule, the graph and the domain sizes are not copied but only referenced by the elimination sequence algorithm.

Reimplemented from gum::EliminationSequenceStrategy.

Definition at line 135 of file defaultEliminationSequenceStrategy.cpp.

References __createSimplicialSet(), and gum::EliminationSequenceStrategy::setGraph().

Referenced by DefaultEliminationSequenceStrategy().

136  {
139  return true;
140  }
141 
142  return false;
143  }
void __createSimplicialSet()
create a new simplicial set suited for the current graph
UndiGraph * graph() const noexcept
returns the current graph
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes)
sets a new graph to be triangulated
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ __log_weights

NodeProperty< double > gum::DefaultEliminationSequenceStrategy::__log_weights
private

for each node, the weight of the clique created by the node's elimination

Definition at line 223 of file defaultEliminationSequenceStrategy.h.

Referenced by __createSimplicialSet(), clear(), DefaultEliminationSequenceStrategy(), and nextNodeToEliminate().

◆ __provide_fill_ins

bool gum::DefaultEliminationSequenceStrategy::__provide_fill_ins {false}
private

indicates whether we compute new fill-ins

Definition at line 235 of file defaultEliminationSequenceStrategy.h.

Referenced by __createSimplicialSet(), askFillIns(), fillIns(), and providesFillIns().

◆ __simplicial_ratio

double gum::DefaultEliminationSequenceStrategy::__simplicial_ratio
private

the ratio used by __simplicial_set for its quasi-simplicial nodes

Definition at line 229 of file defaultEliminationSequenceStrategy.h.

Referenced by __createSimplicialSet(), and newFactory().

◆ __simplicial_set

SimplicialSet* gum::DefaultEliminationSequenceStrategy::__simplicial_set {nullptr}
private

◆ __simplicial_threshold

double gum::DefaultEliminationSequenceStrategy::__simplicial_threshold
private

the threshold used by __simplicial_set to determine small cliques

Definition at line 232 of file defaultEliminationSequenceStrategy.h.

Referenced by __createSimplicialSet(), and newFactory().

◆ _domain_sizes

const NodeProperty< Size >* gum::EliminationSequenceStrategy::_domain_sizes {nullptr}
protectedinherited

◆ _graph

◆ _log_domain_sizes

NodeProperty< double > gum::EliminationSequenceStrategy::_log_domain_sizes
protectedinherited

The documentation for this class was generated from the following files: