aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::O3prmBNWriter< GUM_SCALAR > Class Template Reference

<agrum/PRM/o3prm/O3prmBNWriter.h> More...

#include <O3prmBNWriter.h>

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

Public Member Functions

virtual void write (std::ostream &output, const IBayesNet< GUM_SCALAR > &bn) final
 Writes an bayes net in the given ouput stream. More...
 
virtual void write (const std::string &filePath, const IBayesNet< GUM_SCALAR > &bn) final
 Writes an bayes net in the file referenced by filePath. More...
 
Constructor & destructor
 O3prmBNWriter ()
 Default constructor. More...
 
virtual ~O3prmBNWriter ()
 Destructor. More...
 

Detailed Description

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

<agrum/PRM/o3prm/O3prmBNWriter.h>

Writes an bayes net in a text file with O3PRM format

This class export a bayes net into an text file, using O3PRM format

Definition at line 58 of file O3prmBNWriter.h.

Constructor & Destructor Documentation

◆ O3prmBNWriter()

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

Default constructor.

◆ ~O3prmBNWriter()

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

Destructor.

Member Function Documentation

◆ _extractAttribute_()

template<typename GUM_SCALAR >
std::string gum::O3prmBNWriter< GUM_SCALAR >::_extractAttribute_ ( const IBayesNet< GUM_SCALAR > &  bn,
NodeId  node 
)
private

◆ _extractCPT_()

template<typename GUM_SCALAR >
std::string gum::O3prmBNWriter< GUM_SCALAR >::_extractCPT_ ( const IBayesNet< GUM_SCALAR > &  bn,
NodeId  node 
)
private

◆ _extractDiscretizedType_()

template<typename GUM_SCALAR >
template<typename VARTYPE >
std::string gum::O3prmBNWriter< GUM_SCALAR >::_extractDiscretizedType_ ( const VARTYPE *  var)
private

◆ _extractLabelizedType_()

template<typename GUM_SCALAR >
std::string gum::O3prmBNWriter< GUM_SCALAR >::_extractLabelizedType_ ( const IBayesNet< GUM_SCALAR > &  bn,
NodeId  node 
)
private

◆ _extractName_()

template<typename GUM_SCALAR >
std::string gum::O3prmBNWriter< GUM_SCALAR >::_extractName_ ( const IBayesNet< GUM_SCALAR > &  bn,
NodeId  node 
)
private

◆ _extractParents_()

template<typename GUM_SCALAR >
std::string gum::O3prmBNWriter< GUM_SCALAR >::_extractParents_ ( const IBayesNet< GUM_SCALAR > &  bn,
NodeId  node 
)
private

◆ _extractRangeType_()

template<typename GUM_SCALAR >
std::string gum::O3prmBNWriter< GUM_SCALAR >::_extractRangeType_ ( const IBayesNet< GUM_SCALAR > &  bn,
NodeId  node 
)
private

◆ _extractType_()

template<typename GUM_SCALAR >
std::string gum::O3prmBNWriter< GUM_SCALAR >::_extractType_ ( const IBayesNet< GUM_SCALAR > &  bn,
NodeId  node 
)
private

◆ write() [1/2]

template<typename GUM_SCALAR >
virtual void gum::O3prmBNWriter< GUM_SCALAR >::write ( std::ostream &  output,
const IBayesNet< GUM_SCALAR > &  bn 
)
finalvirtual

Writes an bayes net in the given ouput stream.

Parameters
outputThe output stream.
bnThe bayes net writen in the stream.
Exceptions
IOErrorRaised if an I/O error occurs.

Implements gum::BNWriter< GUM_SCALAR >.

◆ write() [2/2]

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

Writes an bayes net 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 bayes net.
bnThe bayes net written in the file.
Exceptions
IOErrorRaised if an I/O error occurs.

Implements gum::BNWriter< GUM_SCALAR >.


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