aGrUM  0.13.2
gum::BIFWriter< GUM_SCALAR > Class Template Reference

Writes a IBayesNet in the BIF format. More...

#include <agrum/BN/io/BIF/BIFWriter.h>

+ Inheritance diagram for gum::BIFWriter< GUM_SCALAR >:
+ Collaboration diagram for gum::BIFWriter< GUM_SCALAR >:

Public Member Functions

void write (std::ostream &output, const IBayesNet< GUM_SCALAR > &bn) final
 Writes a Bayesian Network in the output stream using the BIF format. More...
 
void write (const std::string &filePath, const IBayesNet< GUM_SCALAR > &bn) final
 Writes a Bayesian Network in the referenced file using the BIF format. More...
 
Constructor & destructor
 BIFWriter ()
 Default constructor. More...
 
 ~BIFWriter () final
 Destructor. More...
 

Detailed Description

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

Writes a IBayesNet in the BIF format.

This class servers to write the content of a Bayesian Network in the BIF format. See http://www.cs.cmu.edu/~fgcozman/Research/InterchangeFormat/Old/xmlbif02.html for information on this format.

Definition at line 57 of file BIFWriter.h.

Constructor & Destructor Documentation

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

Default constructor.

template<typename GUM_SCALAR>
gum::BIFWriter< GUM_SCALAR >::~BIFWriter ( )
final

Destructor.

Member Function Documentation

template<typename GUM_SCALAR>
std::string gum::BIFWriter< GUM_SCALAR >::__header ( const IBayesNet< GUM_SCALAR > &  bn)
private
template<typename GUM_SCALAR>
std::string gum::BIFWriter< GUM_SCALAR >::__variableBloc ( const DiscreteVariable var)
private
template<typename GUM_SCALAR>
std::string gum::BIFWriter< GUM_SCALAR >::__variableCPT ( const Potential< GUM_SCALAR > &  cpt)
private
template<typename GUM_SCALAR>
std::string gum::BIFWriter< GUM_SCALAR >::__variablesLabels ( const Sequence< const DiscreteVariable * > &  varsSeq,
const Instantiation inst 
)
private
template<typename GUM_SCALAR>
void gum::BIFWriter< GUM_SCALAR >::write ( std::ostream &  output,
const IBayesNet< GUM_SCALAR > &  bn 
)
finalvirtual

Writes a Bayesian Network in the output stream using the BIF format.

Parameters
outputThe output stream.
bnThe Bayesian Network writen in output.
Exceptions
IOErrorRaised if and I/O error occurs.

Implements gum::BNWriter< GUM_SCALAR >.

Referenced by gum::credal::CredalNet< GUM_SCALAR >::saveBNsMinMax().

+ Here is the caller graph for this function:

template<typename GUM_SCALAR>
void gum::BIFWriter< GUM_SCALAR >::write ( const std::string &  filePath,
const IBayesNet< GUM_SCALAR > &  bn 
)
finalvirtual

Writes a Bayesian Network in the referenced file using the BIF format.

If the files doesn't exists, it is created.

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

Implements gum::BNWriter< GUM_SCALAR >.


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