aGrUM  0.14.2
fmdpDatReader.h File Reference

Definition of templatized reader of dat files for Factored Markov Decision Process. More...

#include <fstream>
#include <iostream>
#include <string>
#include <agrum/FMDP/fmdp.h>
#include <agrum/FMDP/fmdpFactory.h>
#include <agrum/FMDP/io/fmdpReader.h>
#include <agrum/multidim/implementations/multiDimFunctionGraph.h>
#include <agrum/FMDP/io/dat/fmdpDatReader_tpl.h>
+ Include dependency graph for fmdpDatReader.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gum::FMDPDatReader< GUM_SCALAR >
 Definition of templatized reader of FMDPDat files for Factored Markov Decision Processes. More...
 

Namespaces

 gum
 gum is the global namespace for all aGrUM entities
 

Detailed Description

Definition of templatized reader of dat files for Factored Markov Decision Process.

how to use it :

// OPTIONAL LISTENER CLASS
class aSimpleListener : public gum::Listener {
public:
void whenLoading(const void *buffer,int percent) {
// 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::FMDPDatReader<double> reader( &fmdp, std::string( args[1] ) );
// OPTIONAL SECTION
aSimpleListener l;
GUM_CONNECT( reader.scanner(), onLoad, l, aSimpleListener::whenLoading );
// END OF OPTIONNAL SECTION
if ( reader.proceed() == 0 ) {
std::cerr << "Well done !" << std::endl;
} else {
reader.showElegantErrorsAndWarnings();
reader.showErrorCounts();
}
} catch ( gum::IOError& e ) { GUM_SHOWERROR( e ); }
return 0;
Author
Pierre-Henri WUILLEMIN

Definition in file fmdpDatReader.h.