![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
Pure virtual class for writting a BN to a file. More...
#include <agrum/BN/io/BNWriter.h>
Public Member Functions | |
BNWriter () | |
Default constructor. More... | |
virtual | ~BNWriter () |
Default destructor. More... | |
virtual void | write (std::ostream &output, const IBayesNet< GUM_SCALAR > &bn)=0 |
Writes a Bayesian network in the ouput stream. More... | |
virtual void | write (const std::string &filePath, const IBayesNet< GUM_SCALAR > &bn)=0 |
Writes a Bayesian network in the file referenced by filePath. More... | |
Pure virtual class for writting a BN to a file.
Every class used to write the content of a Bayesian network in a stream, or a file must be a subclass of BNWriter.
Definition at line 56 of file BNWriter.h.
gum::BNWriter< GUM_SCALAR >::BNWriter | ( | ) |
Default constructor.
|
virtual |
Default destructor.
|
pure virtual |
Writes a Bayesian network in the ouput stream.
output | The output stream. |
bn | The Bayesian network writed in output. |
IOError | Raised if an I/O error occurs. |
Implemented in gum::CNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::BIFXMLBNWriter< GUM_SCALAR >, gum::ContextualDependenciesCNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::BIFWriter< GUM_SCALAR >, gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::NetWriter< GUM_SCALAR >, gum::O3prmBNWriter< GUM_SCALAR >, gum::GeneralizedCNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::UAIBNWriter< GUM_SCALAR >, and gum::DSLWriter< GUM_SCALAR >.
|
pure virtual |
Writes a Bayesian network in the file referenced by filePath.
If the file doesn't exists, it is created. If the file exists, it's content will be erased.
filePath | The path to the file used to write the Bayesian network. |
bn | The Bayesian network writen in the file. |
IOError | Raised if an I/O error occurs. |
Implemented in gum::CNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::BIFXMLBNWriter< GUM_SCALAR >, gum::ContextualDependenciesCNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::BIFWriter< GUM_SCALAR >, gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::NetWriter< GUM_SCALAR >, gum::O3prmBNWriter< GUM_SCALAR >, gum::UAIBNWriter< GUM_SCALAR >, gum::GeneralizedCNFWriter< GUM_SCALAR, IApproximationPolicy >, and gum::DSLWriter< GUM_SCALAR >.