30 #ifndef __VAR_MOD_2_BNS_MAP__H__ 31 #define __VAR_MOD_2_BNS_MAP__H__ 55 template <
typename GUM_SCALAR >
58 typedef std::vector< bool >
dBN;
60 typedef typename std::vector< Size >
varKey;
82 std::vector< std::vector< std::vector< bool > > >
_sampleDef;
125 bool insert(
const std::vector< bool >& bn,
const std::vector< Size >& key);
134 bool insert(
const std::vector< Size >& key,
const bool isBetter);
153 const std::vector< std::vector< std::vector< bool > > >& sample);
166 const std::vector< std::vector< std::vector< bool > > >&
getSampleDef();
185 std::vector< std::vector< std::vector< std::vector< bool > > > >
196 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS gum::HashTable< Size, dBN > hashNet
~VarMod2BNsMap()
Destructor.
hashVars _myHashVars
Map id - list(varKey) : get all variables, modalities associated to this optimal net id...
std::hash< std::vector< bool > > _vectHash
The hash fuction.
gum::HashTable< varKey, std::list< Size > > varHashs
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const CredalNet< GUM_SCALAR > * cnet
A pointer to the CredalNet to be used.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size _currentHash
The current sampled IBayesNet hash.
Class template representing a Credal Network.
std::vector< std::vector< std::vector< std::vector< bool > > > > getFullBNOptsFromKey(const std::vector< Size > &key)
Get optimum IBayesNet (s) with structure of the given variable, modality for min or max...
const std::vector< dBN *> getBNOptsFromKey(const std::vector< Size > &key)
Get optimum IBayesNet (s) without structure of the given variable, modality for min or max...
gum::HashTable< Size, std::list< varKey > > hashVars
dBN _currentSample
The current sampled IBayesNet.
Size getEntrySize() const
Get the number of IBayesNet stored.
std::vector< std::vector< std::vector< bool > > > _sampleDef
Since all samples have the same structure, this will be used as default initialization (copy construc...
void setCNet(const CredalNet< GUM_SCALAR > &cn)
Initialize __sampleDef from the CredalNet.
varHashs _myVarHashs
Map varKey - list(id) : get all optimal nets id from the given key : variable, modality and min=0 ( o...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const dBN & getCurrentSample()
Get the current sample as a vector of bits without structure.
VarMod2BNsMap()
Default constructor that should be used only by InferenceEngine since it has a member variable...
const std::vector< std::vector< std::vector< bool > > > & getSampleDef()
Get the sample structure.
hashNet _myHashNet
Map id - dBN : get a net from it's id.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
bool insert(const std::vector< bool > &bn, const std::vector< Size > &key)
Insert for thread fusion.
Class used to store optimum IBayesNet during some inference algorithms.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
std::vector< Size > varKey
void setCurrentSample(const std::vector< std::vector< std::vector< bool > > > &sample)
Set the current thread sample and it's hash.