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

<agrum/BN/io/BIFXML/BIFXMLBNReader.h> More...

#include <BIFXMLBNReader.h>

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

Public Attributes

gum::Signaler2< int, std::string > onProceed
 Signaler used to indicates how many percent of the Xml files have been parsed yet. More...
 

Public Member Functions

 BIFXMLBNReader (BayesNet< GUM_SCALAR > *bn, const std::string &filePath)
 Constructor A reader is created to reading a defined file. More...
 
 ~BIFXMLBNReader () final
 Default destructor. More...
 
Size proceed () final
 Reads the bayes net from the file referenced by filePath given at the creation of class. More...
 

Detailed Description

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

<agrum/BN/io/BIFXML/BIFXMLBNReader.h>

Read an bayes net from an XML file with BIF format.

This class import an bayes net from an XML files using BIF format See http://www-2.cs.cmu.edu/afs/cs/user/fgcozman/www/Research/InterchangeFormat/ for information about this format.

Definition at line 102 of file BIFXMLBNReader.h.

Constructor & Destructor Documentation

◆ BIFXMLBNReader()

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

Constructor A reader is created to reading a defined file.

Note that an BN as to be created before and given in parameter.

◆ ~BIFXMLBNReader()

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

Default destructor.

Member Function Documentation

◆ _fillingBN_()

template<typename GUM_SCALAR>
void gum::BIFXMLBNReader< GUM_SCALAR >::_fillingBN_ ( ticpp::Element parentNetwork)
private

fill the diagram

◆ _parsingVariables_()

template<typename GUM_SCALAR>
void gum::BIFXMLBNReader< GUM_SCALAR >::_parsingVariables_ ( ticpp::Element parentNetwork)
private

Parsing xml element containing data on variables.

◆ proceed()

template<typename GUM_SCALAR>
Size gum::BIFXMLBNReader< GUM_SCALAR >::proceed ( )
finalvirtual

Reads the bayes net from the file referenced by filePath given at the creation of class.

Returns
Returns 0 if no error, 1 if any
Warning
XMLBNReader can not give the number of errors.

Implements gum::BNReader< GUM_SCALAR >.

Member Data Documentation

◆ _bn_

template<typename GUM_SCALAR>
BayesNet< GUM_SCALAR >* gum::BIFXMLBNReader< GUM_SCALAR >::_bn_
private

An handle to the bayes net in which will be load the content of the xml filePath.

Definition at line 146 of file BIFXMLBNReader.h.

◆ _filePath_

template<typename GUM_SCALAR>
std::string gum::BIFXMLBNReader< GUM_SCALAR >::_filePath_
private

the path to the xml filePath

Definition at line 151 of file BIFXMLBNReader.h.

◆ onProceed

template<typename GUM_SCALAR>
gum::Signaler2< int, std::string > gum::BIFXMLBNReader< GUM_SCALAR >::onProceed

Signaler used to indicates how many percent of the Xml files have been parsed yet.

Definition at line 129 of file BIFXMLBNReader.h.


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