![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
<agrum/MRF/io/UAI/UAIMRFWriter.h> More...
#include <UAIMRFWriter.h>
Public Member Functions | |
| void | write (std::ostream &output, const IMarkovRandomField< GUM_SCALAR > &MN) final |
| Writes an Markov net in the given ouput stream. | |
| void | write (const std::string &filePath, const IMarkovRandomField< GUM_SCALAR > &MN) final |
| Writes an Markov net in the file referenced by filePath. | |
Constructor & destructor | |
| UAIMRFWriter () | |
| Default constructor. | |
| ~UAIMRFWriter () | |
| Destructor. | |
Private Member Functions | |
| std::string | _preambule_ (const IMarkovRandomField< GUM_SCALAR > &MN) |
| Returns the header of the BIF file. | |
| std::string | _factorBloc_ (const IMarkovRandomField< GUM_SCALAR > &MN, const Tensor< GUM_SCALAR > &clikpot) |
<agrum/MRF/io/UAI/UAIMRFWriter.h>
Writes an Markov net in a text file with UAI format
This class export a Markov net into an text file, using UAI format
cf. http://www.cs.huji.ac.il/project/PASCAL/fileFormat.php
Definition at line 77 of file UAIMRFWriter.h.
| gum::UAIMRFWriter< GUM_SCALAR >::UAIMRFWriter | ( | ) |
Default constructor.
| gum::UAIMRFWriter< GUM_SCALAR >::~UAIMRFWriter | ( | ) |
Destructor.
|
private |
|
private |
Returns the header of the BIF file.
|
finalvirtual |
Writes an Markov 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.
| filePath | The path to the file used to write the Markov net. |
| MN | The Markov net writen in the file. |
| IOError | Raised if an I/O error occurs. |
Implements gum::MRFWriter< GUM_SCALAR >.
|
finalvirtual |
Writes an Markov net in the given ouput stream.
| output | The output stream. |
| MN | The Markov net writen in the stream. |
| IOError | Raised if an I/O error occurs. |
Implements gum::MRFWriter< GUM_SCALAR >.