aGrUM  0.18.1
a C++ library for (probabilistic) graphical models
gum::IBayesNetFactory Class Referenceabstract

IBayesNetFactory is the non-template interface for BayesNetFactory : many ways to build a BN do not depend on the specification of the GUM_SCALAR template argument (for instance for BN readers). More...

#include <agrum/BN/IBayesNetFactory.h>

+ Inheritance diagram for gum::IBayesNetFactory:
+ Collaboration diagram for gum::IBayesNetFactory:

Public Member Functions

 IBayesNetFactory ()
 
virtual ~IBayesNetFactory ()
 
verbosity control
void setVerbose ()
 
void resetVerbose ()
 
bool isVerbose ()
 
virtual const DiscreteVariablevarInBN (NodeId id)=0
 Please. More...
 
virtual factory_state state () const =0
 Please. More...
 
virtual NodeId variableId (const std::string &name) const =0
 Please. More...
 
virtual Size cptDomainSize (NodeId n) const =0
 Please. More...
 
virtual void startNetworkDeclaration ()=0
 Please. More...
 
virtual void addNetworkProperty (const std::string &propName, const std::string &propValue)=0
 Please. More...
 
virtual void endNetworkDeclaration ()=0
 Please. More...
 
virtual void startVariableDeclaration ()=0
 Please. More...
 
virtual void variableName (const std::string &name)=0
 Please. More...
 
virtual void variableDescription (const std::string &desc)=0
 Please. More...
 
virtual void variableType (const VarType &type)=0
 Please. More...
 
virtual void addModality (const std::string &name)=0
 Please. More...
 
virtual void addMin (const long &min)=0
 Please. More...
 
virtual void addMax (const long &max)=0
 Please. More...
 
virtual void setVariableCPTImplementation (MultiDimAdressable *impl)=0
 Please. More...
 
virtual NodeId endVariableDeclaration ()=0
 Please. More...
 
virtual void startParentsDeclaration (const std::string &var)=0
 Please. More...
 
virtual void addParent (const std::string &var)=0
 Please. More...
 
virtual void endParentsDeclaration ()=0
 Please. More...
 
virtual void startRawProbabilityDeclaration (const std::string &var)=0
 Please. More...
 
virtual void rawConditionalTable (const std::vector< std::string > &variables, const std::vector< float > &rawTable)=0
 Please. More...
 
virtual void rawConditionalTable (const std::vector< float > &rawTable)=0
 Please. More...
 
virtual void endRawProbabilityDeclaration ()=0
 Please. More...
 
virtual void startFactorizedProbabilityDeclaration (const std::string &var)=0
 Please. More...
 
virtual void startFactorizedEntry ()=0
 Please. More...
 
virtual void endFactorizedEntry ()=0
 Please. More...
 
virtual void setParentModality (const std::string &parent, const std::string &modality)=0
 Please. More...
 
virtual void setVariableValuesUnchecked (const std::vector< float > &values)=0
 Please. More...
 
virtual void setVariableValues (const std::vector< float > &values)=0
 Please. More...
 
virtual void endFactorizedProbabilityDeclaration ()=0
 Please. More...
 
virtual void setVariable (const DiscreteVariable &var)=0
 Please. More...
 
virtual void setVariableCPT (const std::string &varName, MultiDimAdressable *table, bool redefineParents)=0
 Please. More...
 

Public Types

enum  factory_state : char {
  factory_state::NONE, factory_state::NETWORK, factory_state::VARIABLE, factory_state::PARENTS,
  factory_state::RAW_CPT, factory_state::FACT_CPT, factory_state::FACT_ENTRY
}
 The enumeration of states in which the factory can be in. More...
 

Detailed Description

IBayesNetFactory is the non-template interface for BayesNetFactory : many ways to build a BN do not depend on the specification of the GUM_SCALAR template argument (for instance for BN readers).

Definition at line 49 of file IBayesNetFactory.h.

Member Enumeration Documentation

◆ factory_state

The enumeration of states in which the factory can be in.

Every documentation section's name indicates from which state you can call it's methods, and in which state it places the factory.

There is an exception for the delegated CPT definition methods which do not change the state of the factory.

Enumerator
NONE 
NETWORK 
VARIABLE 
PARENTS 
RAW_CPT 
FACT_CPT 
FACT_ENTRY 

Definition at line 60 of file IBayesNetFactory.h.

60  : char {
61  NONE,
62  NETWORK,
63  VARIABLE,
64  PARENTS,
65  RAW_CPT,
66  FACT_CPT,
67  FACT_ENTRY
68  };

Constructor & Destructor Documentation

◆ IBayesNetFactory()

gum::IBayesNetFactory::IBayesNetFactory ( )
inline

Definition at line 70 of file IBayesNetFactory.h.

70 : verbose__(false){};

◆ ~IBayesNetFactory()

virtual gum::IBayesNetFactory::~IBayesNetFactory ( )
inlinevirtual

Definition at line 72 of file IBayesNetFactory.h.

72 {};

Member Function Documentation

◆ addMax()

virtual void gum::IBayesNetFactory::addMax ( const long &  max)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ addMin()

virtual void gum::IBayesNetFactory::addMin ( const long &  min)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ addModality()

virtual void gum::IBayesNetFactory::addModality ( const std::string &  name)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ addNetworkProperty()

virtual void gum::IBayesNetFactory::addNetworkProperty ( const std::string &  propName,
const std::string &  propValue 
)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ addParent()

virtual void gum::IBayesNetFactory::addParent ( const std::string &  var)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ cptDomainSize()

virtual Size gum::IBayesNetFactory::cptDomainSize ( NodeId  n) const
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ endFactorizedEntry()

virtual void gum::IBayesNetFactory::endFactorizedEntry ( )
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ endFactorizedProbabilityDeclaration()

virtual void gum::IBayesNetFactory::endFactorizedProbabilityDeclaration ( )
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ endNetworkDeclaration()

virtual void gum::IBayesNetFactory::endNetworkDeclaration ( )
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ endParentsDeclaration()

virtual void gum::IBayesNetFactory::endParentsDeclaration ( )
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ endRawProbabilityDeclaration()

virtual void gum::IBayesNetFactory::endRawProbabilityDeclaration ( )
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ endVariableDeclaration()

virtual NodeId gum::IBayesNetFactory::endVariableDeclaration ( )
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ isVerbose()

◆ rawConditionalTable() [1/2]

virtual void gum::IBayesNetFactory::rawConditionalTable ( const std::vector< std::string > &  variables,
const std::vector< float > &  rawTable 
)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ rawConditionalTable() [2/2]

virtual void gum::IBayesNetFactory::rawConditionalTable ( const std::vector< float > &  rawTable)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

◆ resetVerbose()

void gum::IBayesNetFactory::resetVerbose ( )
inline

Definition at line 80 of file IBayesNetFactory.h.

References verbose__.

Referenced by gum::BayesNetFactory< GUM_SCALAR >::BayesNetFactory().

80 { verbose__ = false; };
+ Here is the caller graph for this function:

◆ setParentModality()

virtual void gum::IBayesNetFactory::setParentModality ( const std::string &  parent,
const std::string &  modality 
)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ setVariable()

virtual void gum::IBayesNetFactory::setVariable ( const DiscreteVariable var)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ setVariableCPT()

virtual void gum::IBayesNetFactory::setVariableCPT ( const std::string &  varName,
MultiDimAdressable table,
bool  redefineParents 
)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ setVariableCPTImplementation()

virtual void gum::IBayesNetFactory::setVariableCPTImplementation ( MultiDimAdressable impl)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ setVariableValues()

virtual void gum::IBayesNetFactory::setVariableValues ( const std::vector< float > &  values)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ setVariableValuesUnchecked()

virtual void gum::IBayesNetFactory::setVariableValuesUnchecked ( const std::vector< float > &  values)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ setVerbose()

void gum::IBayesNetFactory::setVerbose ( )
inline

Definition at line 78 of file IBayesNetFactory.h.

References verbose__.

78 { verbose__ = true; };

◆ startFactorizedEntry()

virtual void gum::IBayesNetFactory::startFactorizedEntry ( )
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ startFactorizedProbabilityDeclaration()

virtual void gum::IBayesNetFactory::startFactorizedProbabilityDeclaration ( const std::string &  var)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ startNetworkDeclaration()

virtual void gum::IBayesNetFactory::startNetworkDeclaration ( )
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ startParentsDeclaration()

virtual void gum::IBayesNetFactory::startParentsDeclaration ( const std::string &  var)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ startRawProbabilityDeclaration()

virtual void gum::IBayesNetFactory::startRawProbabilityDeclaration ( const std::string &  var)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ startVariableDeclaration()

virtual void gum::IBayesNetFactory::startVariableDeclaration ( )
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ state()

virtual factory_state gum::IBayesNetFactory::state ( ) const
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ variableDescription()

virtual void gum::IBayesNetFactory::variableDescription ( const std::string &  desc)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ variableId()

virtual NodeId gum::IBayesNetFactory::variableId ( const std::string &  name) const
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ variableName()

virtual void gum::IBayesNetFactory::variableName ( const std::string &  name)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ variableType()

virtual void gum::IBayesNetFactory::variableType ( const VarType type)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

◆ varInBN()

virtual const DiscreteVariable& gum::IBayesNetFactory::varInBN ( NodeId  id)
pure virtual

Please.

See also
BayesNetFactory<GUM_SCALAR> for documentation.

Implemented in gum::BayesNetFactory< GUM_SCALAR >.

Referenced by isVerbose().

+ Here is the caller graph for this function:

Member Data Documentation

◆ verbose__

bool gum::IBayesNetFactory::verbose__
private

Definition at line 132 of file IBayesNetFactory.h.

Referenced by isVerbose(), resetVerbose(), and setVerbose().


The documentation for this class was generated from the following file: