aGrUM  0.13.2
BNReader.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
30 #ifndef GUM_BN_READER_H
31 #define GUM_BN_READER_H
32 
33 #include <agrum/BN/BayesNet.h>
34 #include <agrum/agrum.h>
35 #include <iostream>
36 #include <string>
37 
38 namespace gum {
39  /* =========================================================================*/
40  /* === READERS === */
41  /* =========================================================================*/
51  template < typename GUM_SCALAR >
52  class BNReader {
53  public:
61  BNReader(BayesNet< GUM_SCALAR >* bn, const std::string& filename);
62 
66  virtual ~BNReader();
67 
73  virtual Size proceed() = 0;
74  };
75 
76 
77  extern template class BNReader< float >;
78  extern template class BNReader< double >;
79 
80 } /* namespace gum */
81 
83 
84 #endif // GUM_BN_READER_H
virtual Size proceed()=0
Reads a Bayesian Network from the file referenced by filePath into` parameter bayesNet.
Class representing a Bayesian Network.
Definition: BayesNet.h:76
unsigned long Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:50
BNReader(BayesNet< GUM_SCALAR > *bn, const std::string &filename)
Constructor A reader is defined for reading a defined file.
Class representing Bayesian networks.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Pure virtual class for reading a BN from a file.
Definition: BNReader.h:52
virtual ~BNReader()
Default destructor.
Templates implementation of bns/io/gumBNReader.h classes.