![]() |
aGrUM 3.0.0
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 a Markov net to the given output stream. | |
| void | write (std::string_view filePath, const IMarkovRandomField< GUM_SCALAR > &MN) final |
| Writes an Markov net in the file referenced by filePath. | |
| virtual void | write (std::string_view filePath, IMarkovRandomField< GUM_SCALAR > &MN) |
| Writes a Markov random field in the file referenced by filePath, updating metadata (software, creation, lastModification) before writing. | |
Constructor & destructor | |
| UAIMRFWriter () | |
| Default constructor. | |
| ~UAIMRFWriter () override | |
| 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.
|
override |
Destructor.
|
private |
|
private |
Returns the header of the BIF file.
|
virtualinherited |
Writes a Markov random field in the file referenced by filePath, updating metadata (software, creation, lastModification) before writing.
If the file doesn't exists, it is created. If the file exists, it's content will be erased.
Default implementation delegates to the const overload.
| filePath | The path to the file used to write the Markov random field. |
| MN | The Markov random field written to the file (non-const to allow metadata update). |
| IOError | Raised if an I/O error occurs. |
Reimplemented in gum::GumMRFWriter< GUM_SCALAR >.
|
finalvirtual |
Writes a Markov net to the given output stream.
| output | The output stream. |
| MN | The Markov net written to the stream. |
| IOError | Raised if an I/O error occurs. |
Implements gum::MRFWriter< GUM_SCALAR >.
|
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 written to the file. |
| IOError | Raised if an I/O error occurs. |
Implements gum::MRFWriter< GUM_SCALAR >.