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,
const IBayesNet< GUM_SCALAR >& bn) final;
95 virtual void write(
const std::string& filePath,
const IBayesNet< GUM_SCALAR >& bn) final;
98 std::string _extractAttribute_(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
100 std::string _extractType_(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
102 template <
typename VARTYPE >
103 std::string _extractDiscretizedType_(
const VARTYPE* var);
105 std::string _extractName_(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
107 std::string _extractParents_(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
109 std::string _extractCPT_(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
111 std::string _extractRangeType_(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
113 std::string _extractLabelizedType_(
const IBayesNet< GUM_SCALAR >& bn, NodeId node);
117 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 118 extern template class O3prmBNWriter<
double >;
123 #include <agrum/PRM/o3prm/O3prmBNWriter_tpl.h>