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

<agrum/BN/io/cnf/FactorisedValuesCNFWriter.h> More...

#include <FactorisedValuesCNFWriter.h>

+ Inheritance diagram for gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >:
+ Collaboration diagram for gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >:

Public Member Functions

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

Detailed Description

template<typename GUM_SCALAR, template< typename > class IApproximationPolicy = ExactPolicy>
class gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >

<agrum/BN/io/cnf/FactorisedValuesCNFWriter.h>

Writes a IBayesNet in the BN format.

This class servers to write the content of a Bayesian network in the BN format. See TODO for information on this format.

Definition at line 59 of file FactorisedValuesCNFWriter.h.

Constructor & Destructor Documentation

◆ FactorisedValuesCNFWriter()

template<typename GUM_SCALAR , template< typename > class IApproximationPolicy = ExactPolicy>
gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >::FactorisedValuesCNFWriter ( )

Default constructor.

◆ ~FactorisedValuesCNFWriter()

template<typename GUM_SCALAR , template< typename > class IApproximationPolicy = ExactPolicy>
gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >::~FactorisedValuesCNFWriter ( )
final

Destructor.

Member Function Documentation

◆ fromExact()

template<typename GUM_SCALAR , template< typename > class IApproximationPolicy = ExactPolicy>
GUM_SCALAR gum::CNFWriter< GUM_SCALAR, IApproximationPolicy >::fromExact ( const GUM_SCALAR &  value) const
inlineoverrideinherited

Definition at line 104 of file CNFWriter.h.

104  {
105  return IApproximationPolicy< GUM_SCALAR >::fromExact(value);
106  }

◆ write() [1/2]

template<typename GUM_SCALAR , template< typename > class IApproximationPolicy = ExactPolicy>
void gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >::write ( std::ostream &  output,
const IBayesNet< GUM_SCALAR > &  bn 
)
finalvirtual

Writes a Bayesian network in the output stream using the BN format.

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

Implements gum::CNFWriter< GUM_SCALAR, IApproximationPolicy >.

◆ write() [2/2]

template<typename GUM_SCALAR , template< typename > class IApproximationPolicy = ExactPolicy>
void gum::FactorisedValuesCNFWriter< GUM_SCALAR, IApproximationPolicy >::write ( const std::string &  filePath,
const IBayesNet< GUM_SCALAR > &  bn 
)
finalvirtual

Writes a Bayesian network in the referenced file using the BN 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::CNFWriter< GUM_SCALAR, IApproximationPolicy >.


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