aGrUM  0.16.0
gum::JunctionTreeStrategy Class Referenceabstract

Base Class for all the algorithms producing a junction given a set of cliques/subcliques resulting from a triangulation. More...

#include <junctionTreeStrategy.h>

+ Inheritance diagram for gum::JunctionTreeStrategy:
+ Collaboration diagram for gum::JunctionTreeStrategy:

Public Member Functions

Accessors / Modifiers
virtual bool requiresFillIns () const =0
 indicates whether the junction tree strategy needs fill-ins to work properly More...
 
virtual const CliqueGraphjunctionTree ()=0
 returns the junction tree computed More...
 
virtual void setTriangulation (StaticTriangulation *triangulation)=0
 assigns the triangulation to the junction tree strategy More...
 
virtual void moveTriangulation (StaticTriangulation *triangulation)
 assigns a new triangulation to the junction tree strategy during a move construction More...
 
virtual const NodeProperty< NodeId > & createdCliques ()=0
 returns, for each node, the clique of the junction tree which was created by its deletion More...
 
virtual NodeId createdClique (const NodeId id)=0
 returns the Id of the clique of the junction tree created by the elimination of a given node during the triangulation process More...
 
virtual void clear ()=0
 resets the current junction tree strategy data structures More...
 

Protected Attributes

StaticTriangulation_triangulation {nullptr}
 the triangulation to which the junction tree is associated More...
 

Constructors / Destructors

virtual ~JunctionTreeStrategy ()
 destructor More...
 
virtual JunctionTreeStrategynewFactory () const =0
 create a clone not assigned to any triangulation algorithm More...
 
virtual JunctionTreeStrategycopyFactory (StaticTriangulation *triangulation=nullptr) const =0
 virtual copy constructor More...
 
 JunctionTreeStrategy ()
 default constructor More...
 
 JunctionTreeStrategy (const JunctionTreeStrategy &from)
 copy constructor More...
 
 JunctionTreeStrategy (JunctionTreeStrategy &&from)
 move constructor More...
 

Detailed Description

Base Class for all the algorithms producing a junction given a set of cliques/subcliques resulting from a triangulation.

Definition at line 48 of file junctionTreeStrategy.h.

Constructor & Destructor Documentation

◆ ~JunctionTreeStrategy()

gum::JunctionTreeStrategy::~JunctionTreeStrategy ( )
virtual

destructor

Definition at line 55 of file junctionTreeStrategy.cpp.

55  {
56  // for debugging purposes
57  GUM_DESTRUCTOR(JunctionTreeStrategy);
58  }
JunctionTreeStrategy()
default constructor

◆ JunctionTreeStrategy() [1/3]

gum::JunctionTreeStrategy::JunctionTreeStrategy ( )
protected

default constructor

Definition at line 35 of file junctionTreeStrategy.cpp.

35  {
36  // for debugging purposes
37  GUM_CONSTRUCTOR(JunctionTreeStrategy);
38  }
JunctionTreeStrategy()
default constructor

◆ JunctionTreeStrategy() [2/3]

gum::JunctionTreeStrategy::JunctionTreeStrategy ( const JunctionTreeStrategy from)
protected

copy constructor

Definition at line 41 of file junctionTreeStrategy.cpp.

41  :
42  _triangulation(from._triangulation) {
43  // for debugging purposes
44  GUM_CONS_CPY(JunctionTreeStrategy);
45  }
StaticTriangulation * _triangulation
the triangulation to which the junction tree is associated
JunctionTreeStrategy()
default constructor

◆ JunctionTreeStrategy() [3/3]

gum::JunctionTreeStrategy::JunctionTreeStrategy ( JunctionTreeStrategy &&  from)
protected

move constructor

Definition at line 48 of file junctionTreeStrategy.cpp.

48  :
49  _triangulation(from._triangulation) {
50  // for debugging purposes
51  GUM_CONS_MOV(JunctionTreeStrategy);
52  }
StaticTriangulation * _triangulation
the triangulation to which the junction tree is associated
JunctionTreeStrategy()
default constructor

Member Function Documentation

◆ clear()

virtual void gum::JunctionTreeStrategy::clear ( )
pure virtual

resets the current junction tree strategy data structures

Implemented in gum::DefaultJunctionTreeStrategy.

Referenced by gum::StaticTriangulation::clear().

+ Here is the caller graph for this function:

◆ copyFactory()

virtual JunctionTreeStrategy* gum::JunctionTreeStrategy::copyFactory ( StaticTriangulation triangulation = nullptr) const
pure virtual

virtual copy constructor

Parameters
triangulationif triangulation is different from nullptr, this becomes the new triangulation algorithm associated with the junction tree strategy

Implemented in gum::DefaultJunctionTreeStrategy.

Referenced by gum::StaticTriangulation::StaticTriangulation().

+ Here is the caller graph for this function:

◆ createdClique()

virtual NodeId gum::JunctionTreeStrategy::createdClique ( const NodeId  id)
pure virtual

returns the Id of the clique of the junction tree created by the elimination of a given node during the triangulation process

Implemented in gum::DefaultJunctionTreeStrategy.

◆ createdCliques()

virtual const NodeProperty< NodeId >& gum::JunctionTreeStrategy::createdCliques ( )
pure virtual

returns, for each node, the clique of the junction tree which was created by its deletion

Implemented in gum::DefaultJunctionTreeStrategy.

Referenced by gum::StaticTriangulation::__computeMaxPrimeJunctionTree().

+ Here is the caller graph for this function:

◆ junctionTree()

virtual const CliqueGraph& gum::JunctionTreeStrategy::junctionTree ( )
pure virtual

returns the junction tree computed

The idea behind this method is that the JunctionTreeStrategy asks its assigned triangulation (see method setTriangulation) all the data it needs to compute correctly the junction tree. For instance, it may asks for a triangulated graph or an elimination tree, or even the order of elimination of the nodes, etc. All these data are available from the triangulation class. Knowing these data, the junctionTreeStrategy computes and returns a junction tree corresponding to the triangulated graph.

Implemented in gum::DefaultJunctionTreeStrategy.

Referenced by gum::StaticTriangulation::StaticTriangulation().

+ Here is the caller graph for this function:

◆ moveTriangulation()

void gum::JunctionTreeStrategy::moveTriangulation ( StaticTriangulation triangulation)
virtual

assigns a new triangulation to the junction tree strategy during a move construction

Definition at line 63 of file junctionTreeStrategy.cpp.

References _triangulation.

Referenced by gum::StaticTriangulation::StaticTriangulation().

63  {
64  _triangulation = triangulation;
65  }
StaticTriangulation * _triangulation
the triangulation to which the junction tree is associated
+ Here is the caller graph for this function:

◆ newFactory()

virtual JunctionTreeStrategy* gum::JunctionTreeStrategy::newFactory ( ) const
pure virtual

create a clone not assigned to any triangulation algorithm

Implemented in gum::DefaultJunctionTreeStrategy.

◆ requiresFillIns()

virtual bool gum::JunctionTreeStrategy::requiresFillIns ( ) const
pure virtual

indicates whether the junction tree strategy needs fill-ins to work properly

If the junctionTreeStrategy needs fill-ins to work properly, its assigned triangulation instance (see method setTriangulation) will be commited to compute them.

Implemented in gum::DefaultJunctionTreeStrategy.

◆ setTriangulation()

virtual void gum::JunctionTreeStrategy::setTriangulation ( StaticTriangulation triangulation)
pure virtual

assigns the triangulation to the junction tree strategy

Implemented in gum::DefaultJunctionTreeStrategy.

Referenced by gum::StaticTriangulation::StaticTriangulation().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _triangulation

StaticTriangulation* gum::JunctionTreeStrategy::_triangulation {nullptr}
protected

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