49#ifndef __VAR_MOD_2_BNS_MAP__H__
50#define __VAR_MOD_2_BNS_MAP__H__
72 template <
typename GUM_SCALAR >
74 using dBN = std::vector< bool >;
94 std::vector< std::vector< std::vector< bool > > >
sampleDef_;
137 bool insert(
const std::vector< bool >& bn,
const std::vector< Size >& key);
146 bool insert(
const std::vector< Size >& key,
const bool isBetter);
164 void setCurrentSample(
const std::vector< std::vector< std::vector< bool > > >& sample);
177 const std::vector< std::vector< std::vector< bool > > >&
getSampleDef();
196 std::vector< std::vector< std::vector< std::vector< bool > > > >
207#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Class template representing a Credal Network.
Class used to store optimum IBayesNet during some inference algorithms.
Size getEntrySize() const
Get the number of IBayesNet stored.
std::vector< Size > varKey
varHashs myVarHashs_
Map varKey - list(id) : get all optimal nets id from the given key : variable, modality and min=0 ( o...
const dBN & getCurrentSample()
Get the current sample as a vector of bits without structure.
dBN currentSample_
The current sampled IBayesNet.
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.
gum::HashTable< Size, dBN > hashNet
std::hash< std::vector< bool > > vectHash_
The hash fuction.
hashNet myHashNet_
Map id - dBN : get a net from it's id.
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.
const CredalNet< GUM_SCALAR > * cnet
A pointer to the CredalNet to be used.
~VarMod2BNsMap()
Destructor.
const std::vector< std::vector< std::vector< bool > > > & getSampleDef()
Get the sample structure.
Size currentHash_
The current sampled IBayesNet hash.
bool insert(const std::vector< bool > &bn, const std::vector< Size > &key)
Insert for thread fusion.
void setCurrentSample(const std::vector< std::vector< std::vector< bool > > > &sample)
Set the current thread sample and it's hash.
void setCNet(const CredalNet< GUM_SCALAR > &cn)
Initialize sampleDef from the CredalNet.
gum::HashTable< varKey, std::list< Size > > varHashs
gum::HashTable< Size, std::list< varKey > > hashVars
hashVars myHashVars_
Map id - list(varKey) : get all variables, modalities associated to this optimal net id.
std::vector< std::vector< std::vector< bool > > > sampleDef_
Since all samples have the same structure, this will be used as default initialization (copy construc...
VarMod2BNsMap(const CredalNet< GUM_SCALAR > &cn)
Thread constructor.
VarMod2BNsMap()
Default constructor that should be used only by InferenceEngine since it has a member variable.
Class representing Credal Networks.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
namespace for all credal networks entities
gum is the global namespace for all aGrUM entities