aGrUM  0.14.2
defaultTriangulation.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
26 #include <agrum/agrum.h>
30 
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
32 
33 namespace gum {
34 
36  DefaultTriangulation::DefaultTriangulation(const UndiGraph* theGraph,
37  const NodeProperty< Size >* domsizes,
38  bool minimality,
39  double theRatio,
40  double theThreshold) :
41  UnconstrainedTriangulation(theGraph,
42  domsizes,
43  DefaultEliminationSequenceStrategy(),
44  DefaultJunctionTreeStrategy(),
45  minimality),
46  __quasi_ratio(theRatio), __threshold(theThreshold) {
47  // for debugging purposes
48  GUM_CONSTRUCTOR(DefaultTriangulation);
49  }
50 
53  double theRatio,
54  double theThreshold) :
55  UnconstrainedTriangulation(DefaultEliminationSequenceStrategy(),
56  DefaultJunctionTreeStrategy(),
57  minimality),
58  __quasi_ratio(theRatio), __threshold(theThreshold) {
59  // for debugging purposes
60  GUM_CONSTRUCTOR(DefaultTriangulation);
61  }
62 
64  DefaultTriangulation::DefaultTriangulation(const DefaultTriangulation& from) :
65  UnconstrainedTriangulation(from), __quasi_ratio(from.__quasi_ratio),
66  __threshold(from.__threshold) {
67  // for debugging purposes
68  GUM_CONS_CPY(DefaultTriangulation);
69  }
70 
72  DefaultTriangulation::DefaultTriangulation(DefaultTriangulation&& from) :
73  UnconstrainedTriangulation(std::move(from)),
74  __quasi_ratio(from.__quasi_ratio), __threshold(from.__threshold) {
75  // for debugging purposes
76  GUM_CONS_MOV(DefaultTriangulation);
77  }
78 
81  // for debugging purposes
82  GUM_DESTRUCTOR(DefaultTriangulation);
83  }
84 
86  DefaultTriangulation* DefaultTriangulation::newFactory() const {
87  return new DefaultTriangulation(
88  isMinimalityRequired(), __quasi_ratio, __threshold);
89  }
90 
92  DefaultTriangulation* DefaultTriangulation::copyFactory() const {
93  return new DefaultTriangulation(*this);
94  }
95 
96 } /* namespace gum */
97 
98 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual DefaultTriangulation * newFactory() const
virtual clone constructor
STL namespace.
DefaultTriangulation(const UndiGraph *graph, const NodeProperty< Size > *dom_sizes, bool minimality=false, double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
basic constructor. initialize the triangulation
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
~DefaultTriangulation()
destructor
virtual DefaultTriangulation * copyFactory() const
virtual copy constructor
An algorithms producing a junction given the elimination tree produced by the triangulation algorithm...
Class for computing default triangulations of graphs.
An efficient unconstrained elimination sequence algorithm.