aGrUM  0.20.2
a C++ library for (probabilistic) graphical models
o4DGContext.cpp
Go to the documentation of this file.
1 /**
2  *
3  * Copyright 2005-2020 Pierre-Henri WUILLEMIN(@LIP6) & Christophe GONZALES(@AMU)
4  * info_at_agrum_dot_org
5  *
6  * This library is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 
22 /**
23  * @file
24  * @brief Class used to manipulate o4DGContext in Function Graph Operations
25  *
26  * @author Christophe GONZALES(@AMU) and Pierre-Henri WUILLEMIN(@LIP6)
27  * @author Pierre-Henri WUILLEMIN(@LIP6) and Jean-Christophe MAGNAN and Christophe
28  * GONZALES(@AMU)
29  */
30 
31 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/operators/o4DGContext.h>
32 
33 namespace gum {
34 
35  // First 140 prime numbers...
36  // see e.g.
37  // http://en.wikipedia.org/wiki/List_of_prime_numbers#The_first_500_prime_numbers
38  // if more is needed...
39  // Don't forget to change nbLogPrime__ to match number of log2 of prime
40  // numbers in that table.
41  const Idx O4DGContext::nbLogPrime__ = 140;
42 
43  const double O4DGContext::logPrime__[] = {
44  log2(2), log2(3), log2(5), log2(7), log2(11), log2(13), log2(17),
45  log2(19), log2(23), log2(29), log2(31), log2(37), log2(41), log2(43),
46  log2(47), log2(53), log2(59), log2(61), log2(67), log2(71), log2(73),
47  log2(79), log2(83), log2(89), log2(97), log2(101), log2(103), log2(107),
48  log2(109), log2(113), log2(127), log2(131), log2(137), log2(139), log2(149),
49  log2(151), log2(157), log2(163), log2(167), log2(173), log2(179), log2(181),
50  log2(191), log2(193), log2(197), log2(199), log2(211), log2(223), log2(227),
51  log2(229), log2(233), log2(239), log2(241), log2(251), log2(257), log2(263),
52  log2(269), log2(271), log2(277), log2(281), log2(283), log2(293), log2(307),
53  log2(311), log2(313), log2(317), log2(331), log2(337), log2(347), log2(349),
54  log2(353), log2(359), log2(367), log2(373), log2(379), log2(383), log2(389),
55  log2(397), log2(401), log2(409), log2(419), log2(421), log2(431), log2(433),
56  log2(439), log2(443), log2(449), log2(457), log2(461), log2(463), log2(467),
57  log2(479), log2(487), log2(491), log2(499), log2(503), log2(509), log2(521),
58  log2(523), log2(541), log2(547), log2(557), log2(563), log2(569), log2(571),
59  log2(577), log2(587), log2(593), log2(599), log2(601), log2(607), log2(613),
60  log2(617), log2(619), log2(631), log2(641), log2(643), log2(647), log2(653),
61  log2(659), log2(661), log2(673), log2(677), log2(683), log2(691), log2(701),
62  log2(709), log2(719), log2(727), log2(733), log2(739), log2(743), log2(751),
63  log2(757), log2(761), log2(769), log2(773), log2(787), log2(797), log2(809)};
64 
68 
69  // Default constructor.
74  nbVar__ = nbVar;
75  }
76 
77  // Default Destructor.
79 
80 } // namespace gum
81 
82 #ifdef GUM_NO_INLINE
83 # include <agrum/tools/multidim/utils/FunctionGraphUtilities/operators/o4DGContext_inl.h>
84 #endif
INLINE void emplace(Args &&... args)
Definition: set_tpl.h:669