33 #include <agrum/MN/MarkovNet.h> 35 #include <agrum/tools/variables/rangeVariable.h> 36 #include <agrum/tools/variables/labelizedVariable.h> 37 #include <agrum/tools/variables/integerVariable.h> 38 #include <agrum/tools/variables/discretizedVariable.h> 40 #include <agrum/tools/multidim/aggregators/amplitude.h> 41 #include <agrum/tools/multidim/aggregators/and.h> 42 #include <agrum/tools/multidim/aggregators/count.h> 43 #include <agrum/tools/multidim/aggregators/exists.h> 44 #include <agrum/tools/multidim/aggregators/forall.h> 45 #include <agrum/tools/multidim/aggregators/max.h> 46 #include <agrum/tools/multidim/aggregators/median.h> 47 #include <agrum/tools/multidim/aggregators/min.h> 48 #include <agrum/tools/multidim/aggregators/or.h> 50 #include <agrum/tools/multidim/ICIModels/multiDimNoisyAND.h> 51 #include <agrum/tools/multidim/ICIModels/multiDimNoisyORCompound.h> 52 #include <agrum/tools/multidim/ICIModels/multiDimNoisyORNet.h> 54 #include <agrum/tools/multidim/ICIModels/multiDimLogit.h> 56 #include <agrum/BN/generator/simpleCPTGenerator.h> 57 #include <agrum/tools/core/utils_string.h> 111 }
else if (
ds == 1) {
113 "Only one value for variable " <<
name <<
" (2 at least are needed).");
143 template <
typename GUM_SCALAR >
163 MarkovNet<
GUM_SCALAR > MarkovNet< GUM_SCALAR >::fromBN(
const BayesNet< GUM_SCALAR >& bn) {
164 MarkovNet< GUM_SCALAR > mn;
165 for (NodeId nod: bn.nodes()) {
166 mn.add(bn.variable(nod), nod);
168 mn.beginTopologyTransformation();
169 for (NodeId nod: bn.nodes()) {
170 mn.addFactor(bn.cpt(nod));
172 mn.endTopologyTransformation();
173 mn.setProperty(
"name", bn.propertyWithDefault(
"name",
"noname"));
261 if (
res ==
nullptr) {
283 "Variable " <<
name <<
"needs more than " <<
nbrmod <<
" modalities");
353 for (
const auto&
ns:
vs) {
356 for (
const auto&
ns:
vs) {
366 if (!
this->
empty()) {
368 for (
const auto no:
l) {
INLINE void emplace(Args &&... args)
NodeId build_node_for_MN(MarkovNet< GUM_SCALAR > &mn, std::string node, Size default_domain_size)