aGrUM  0.13.2
BIFXMLBNReader.h File Reference

classe for import of bayes net from a XML file written with BIF Format More...

#include <list>
#include <sstream>
#include <string>
#include <agrum/BN/io/BNReader.h>
#include <agrum/agrum.h>
#include <agrum/core/signal/signaler.h>
#include <agrum/core/signal/signaler2.h>
#include <agrum/external/tinyxml/ticpp/ticpp.h>
#include <agrum/variables/labelizedVariable.h>
#include <agrum/BN/io/BIFXML/BIFXMLBNReader_tpl.h>
+ Include dependency graph for BIFXMLBNReader.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gum::BIFXMLBNReader< GUM_SCALAR >
 <agrum/BN/io/BIFXML/BIFXMLBNReader.h> More...
 

Namespaces

 gum
 gum is the global namespace for all aGrUM entities
 

Macros

#define TIXML_USE_TICPP
 

Detailed Description

classe for import of bayes net from a XML file written with BIF Format

Read an bayes net from a XML file with BIF format

how to use it :

// OPTIONAL LISTENER CLASS
class aSimpleListener : public gum::Listener {
public:
void whenProceeding(const void *buffer,int percent, std::string status) {
// percent goes from 0 to 100 (whenLoading is called at most once for each
integer
between 0 and 100
// percent=200 recieved when End Of File.
}
};
// END OF OPTIONAL LISTENER
try {
gum::BIFXMLBNReader<double> reader(&bn,std::string(args[1]));
// OPTIONAL SECTION
aSimpleListener asl;
GUM_CONNECT( reader, onProceed, asl, aSimpleListener::whenProceing );
// END OF OPTIONAL SECTION
// Not implemented yet section
//if (reader.proceed()==0) {
//std::cerr<<"Well done !"<<std::endl;
//} else {
//reader.showElegantErrorsAndWarnings();
//reader.showErrorCounts();
//}
// End not implemented section
} catch (gum::IOError& e) {GUM_SHOWERROR(e);}
return 0;
Author
Jean-Christophe MAGNAN and Pierre-Henri WUILLEMIN

Definition in file BIFXMLBNReader.h.

Macro Definition Documentation

#define TIXML_USE_TICPP

Definition at line 71 of file BIFXMLBNReader.h.