32 #ifndef GUM_O3PRMBNWRITER_H 33 #define GUM_O3PRMBNWRITER_H 41 #include <agrum/BN/io/BNWriter.h> 42 #include <agrum/agrum.h> 43 #include <agrum/tools/variables/discreteVariable.h> 44 #include <agrum/tools/variables/discretizedVariable.h> 45 #include <agrum/tools/variables/rangeVariable.h> 57 template <
typename GUM_SCALAR >
58 class O3prmBNWriter:
public BNWriter< GUM_SCALAR > {
73 virtual ~O3prmBNWriter();
84 virtual void write(std::ostream& output,
85 const IBayesNet< GUM_SCALAR >& bn) final;
96 virtual void write(
const std::string& filePath,
97 const IBayesNet< GUM_SCALAR >& bn) final;
100 std::string extractAttribute__(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
102 std::string extractType__(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
104 template <
typename VARTYPE >
105 std::string extractDiscretizedType__(
const VARTYPE* var);
107 std::string extractName__(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
109 std::string extractParents__(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
111 std::string extractCPT__(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
113 std::string extractRangeType__(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
115 std::string extractLabelizedType__(
const IBayesNet< GUM_SCALAR >& bn,
120 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 121 extern template class O3prmBNWriter<
double >;
126 #include <agrum/PRM/o3prm/O3prmBNWriter_tpl.h>