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

<agrum/BN/io/XDSL/XDSLBNReader.h> More...

#include <XDSLBNReader.h>

Inheritance diagram for gum::XDSLBNReader< GUM_SCALAR >:
Collaboration diagram for gum::XDSLBNReader< GUM_SCALAR >:

Public Member Functions

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

Public Attributes

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

Private Member Functions

Size _parsingCpts_ (ticpp::Element *cptsNetwork)
 Parsing xml element containing data on variables.
void _parsingExtension_ (ticpp::Element *nodesNetwork)
 Parsing xml element containing extentions on variables.

Private Attributes

BayesNet< GUM_SCALAR > * _bn_
 An handle to the bayes net in which will be load the content of the xml filePath.
std::string _filePath_
 the path to the xml filePath

Detailed Description

template<GUM_Numeric GUM_SCALAR>
class gum::XDSLBNReader< GUM_SCALAR >

<agrum/BN/io/XDSL/XDSLBNReader.h>

Read a Bayesian network from an XML file with BIF format.

This class import a Bayesian network from an XML files using DSL format for information about this format.

Definition at line 121 of file XDSLBNReader.h.

Constructor & Destructor Documentation

◆ XDSLBNReader()

template<GUM_Numeric GUM_SCALAR>
gum::XDSLBNReader< GUM_SCALAR >::XDSLBNReader ( BayesNet< GUM_SCALAR > * bn,
std::string_view filePath )

Constructor A reader is created to reading a defined file.

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

◆ ~XDSLBNReader()

template<GUM_Numeric GUM_SCALAR>
gum::XDSLBNReader< GUM_SCALAR >::~XDSLBNReader ( )
override

Default destructor.

Member Function Documentation

◆ _parsingCpts_()

template<GUM_Numeric GUM_SCALAR>
Size gum::XDSLBNReader< GUM_SCALAR >::_parsingCpts_ ( ticpp::Element * cptsNetwork)
private

Parsing xml element containing data on variables.

Returns
the number of variables found in the file

References _parsingCpts_().

Referenced by _parsingCpts_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _parsingExtension_()

template<GUM_Numeric GUM_SCALAR>
void gum::XDSLBNReader< GUM_SCALAR >::_parsingExtension_ ( ticpp::Element * nodesNetwork)
private

Parsing xml element containing extentions on variables.

References _parsingExtension_().

Referenced by _parsingExtension_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ proceed()

template<GUM_Numeric GUM_SCALAR>
Size gum::XDSLBNReader< GUM_SCALAR >::proceed ( )
final

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.

Member Data Documentation

◆ _bn_

template<GUM_Numeric GUM_SCALAR>
BayesNet< GUM_SCALAR >* gum::XDSLBNReader< GUM_SCALAR >::_bn_
private

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

Definition at line 167 of file XDSLBNReader.h.

◆ _filePath_

template<GUM_Numeric GUM_SCALAR>
std::string gum::XDSLBNReader< GUM_SCALAR >::_filePath_
private

the path to the xml filePath

Definition at line 172 of file XDSLBNReader.h.

◆ onProceed

template<GUM_Numeric GUM_SCALAR>
gum::Signaler< int, std::string > gum::XDSLBNReader< GUM_SCALAR >::onProceed

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

Definition at line 148 of file XDSLBNReader.h.


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