aGrUM  0.13.2
gum::BNWriter< GUM_SCALAR > Class Template Referenceabstract

Pure virtual class for writting a BN to a file. More...

#include <agrum/BN/io/BNWriter.h>

+ Inheritance diagram for gum::BNWriter< GUM_SCALAR >:

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...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::BNWriter< GUM_SCALAR >

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 54 of file BNWriter.h.

Constructor & Destructor Documentation

template<typename GUM_SCALAR >
gum::BNWriter< GUM_SCALAR >::BNWriter ( )

Default constructor.

template<typename GUM_SCALAR >
virtual gum::BNWriter< GUM_SCALAR >::~BNWriter ( )
virtual

Default destructor.

Member Function Documentation

template<typename GUM_SCALAR >
virtual void gum::BNWriter< GUM_SCALAR >::write ( std::ostream &  output,
const IBayesNet< GUM_SCALAR > &  bn 
)
pure virtual
template<typename GUM_SCALAR >
virtual void gum::BNWriter< GUM_SCALAR >::write ( const std::string &  filePath,
const IBayesNet< GUM_SCALAR > &  bn 
)
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.

Parameters
filePathThe path to the file used to write the Bayesian Network.
bnThe Bayesian Network writen in the file.
Exceptions
IOErrorRaised if an I/O error occurs.

Implemented in gum::CNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::ContextualDependenciesCNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::BIFXMLBNWriter< GUM_SCALAR >, gum::BIFWriter< GUM_SCALAR >, gum::NetWriter< GUM_SCALAR >, gum::O3prmBNWriter< GUM_SCALAR >, gum::GeneralizedCNFWriter< GUM_SCALAR, IApproximationPolicy >, gum::UAIWriter< GUM_SCALAR >, and gum::DSLWriter< GUM_SCALAR >.


The documentation for this class was generated from the following file: