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

<agrum/MN/io/UAI/UAIMNWriter.h> More...

#include <UAIMNWriter.h>

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

Public Member Functions

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

Detailed Description

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

<agrum/MN/io/UAI/UAIMNWriter.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 56 of file UAIMNWriter.h.

Constructor & Destructor Documentation

◆ UAIMNWriter()

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

Default constructor.

◆ ~UAIMNWriter()

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

Destructor.

Member Function Documentation

◆ _factorBloc_()

template<typename GUM_SCALAR >
std::string gum::UAIMNWriter< GUM_SCALAR >::_factorBloc_ ( const IMarkovNet< GUM_SCALAR > &  MN,
const Potential< GUM_SCALAR > &  clikpot 
)
private

◆ _preambule_()

template<typename GUM_SCALAR >
std::string gum::UAIMNWriter< GUM_SCALAR >::_preambule_ ( const IMarkovNet< GUM_SCALAR > &  MN)
private

Returns the header of the BIF file.

◆ write() [1/2]

template<typename GUM_SCALAR >
void gum::UAIMNWriter< GUM_SCALAR >::write ( std::ostream &  output,
const IMarkovNet< GUM_SCALAR > &  MN 
)
finalvirtual

Writes an Markov net in the given ouput stream.

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

Implements gum::MNWriter< GUM_SCALAR >.

◆ write() [2/2]

template<typename GUM_SCALAR >
void gum::UAIMNWriter< GUM_SCALAR >::write ( const std::string &  filePath,
const IMarkovNet< GUM_SCALAR > &  MN 
)
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.

Parameters
filePathThe path to the file used to write the Markov net.
MNThe Markov net writen in the file.
Exceptions
IOErrorRaised if an I/O error occurs.

Implements gum::MNWriter< GUM_SCALAR >.


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