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

Pure virtual class for reading a BN from a file. More...

#include <agrum/BN/io/BNReader.h>

+ Inheritance diagram for gum::BNReader< GUM_SCALAR >:

Public Member Functions

 BNReader (BayesNet< GUM_SCALAR > *bn, const std::string &filename)
 Constructor A reader is defined for reading a defined file. More...
 
virtual ~BNReader ()
 Default destructor. More...
 
virtual Size proceed ()=0
 Reads a Bayesian network from the file referenced by filePath into` parameter bayesNet. More...
 

Detailed Description

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

Pure virtual class for reading a BN from a file.

Every class used to read the content of a Bayesian network from a stream, or a file must be a subclass of BNReader.

Definition at line 54 of file BNReader.h.

Constructor & Destructor Documentation

◆ BNReader()

template<typename GUM_SCALAR >
gum::BNReader< GUM_SCALAR >::BNReader ( BayesNet< GUM_SCALAR > *  bn,
const std::string &  filename 
)

Constructor A reader is defined for reading a defined file.

Hence the 2 args of the constructor. Note that the BN has to be built outside the reader. There is no delegation to create/destroy the BN from inside the reader.

◆ ~BNReader()

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

Default destructor.

Member Function Documentation

◆ proceed()

template<typename GUM_SCALAR >
virtual Size gum::BNReader< GUM_SCALAR >::proceed ( )
pure virtual

Reads a Bayesian network from the file referenced by filePath into` parameter bayesNet.

Returns
Returns the number of error during the parsing (0 if none).

Implemented in gum::BIFReader< GUM_SCALAR >, gum::BIFXMLBNReader< GUM_SCALAR >, gum::UAIBNReader< GUM_SCALAR >, gum::NetReader< GUM_SCALAR >, gum::DSLReader< GUM_SCALAR >, and gum::O3prmBNReader< GUM_SCALAR >.


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