Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

HAPI::Domain Class Reference

Inheritance diagram for HAPI::Domain:

HAPI::NetworkModel List of all members.

Detailed Description

A domain is the HUGIN representation of a network.

It is one of the principal structures in HUGIN. It must be constructed before any nodes belonging to the network.

See also:
Node

JunctionTree


Public Member Functions

 Domain ()
 Construct a new, empty Domain object.

 Domain (const std::string &filename)
 Construct a domain by loading the corresponding Hugin Knowledge Base from file.

 Domain (const std::string &filename, const std::string &password)
 Construct a domain by loading the corresponding password protected Hugin Knowledge Base from file.

 Domain (const std::string &filename, ParseListener *pl)
 Construct a domain by reading a NET file description.

 ~Domain () throw ()
 Destruct a Domain object.

Domain * clone () const
 Clone a Domain object.

void adapt ()
 Adapts this Domain according to the evidence entered.

double approximate (double epsilon)
 Remove "near-zero" probabilities from the clique probability tables.

bool cgEvidenceIsPropagated () const
 Test if CG evidence has been propagated for this Domain.

void compile ()
 Compile this Domain using the default triangulation method.

double compress ()
 Remove the zero entries from the clique and separator tables of the junction trees in this Domain.

bool equilibriumIs (Equilibrium eq) const
 Test for Equilibrium type.

bool evidenceIsPropagated () const
 Test if evidence has been propagated for this Domain.

bool evidenceModeIs (EvidenceMode ev) const
 Test for evidence mode.

double getApproximationConstant () const
 Return the approximation constant.

std::string getAttribute (const std::string &key) const
 Return an attrubute value.

Number getCaseCount (size_t config) const
 Retrieve the case count associated with the case config in this domain.

size_t getConcurrencyLevel () const
 Get the current level of concurrency.

double getConflict () const
 Return the conflict value.

NodeList getEliminationOrder () const
 Return the triangulation order.

std::string getFileName () const
 Return the file name most recently used for loading or saving this Domain.

size_t getGrainSize () const
 Return the current value of the grain size parameter.

JunctionTreeList getJunctionTrees () const
 Return the JunctionTrees of this Domain.

double getLogLikelihood () const
 Get the log-likelihood of the domain.

double getLogLikelihoodTolerance () const
 Get current setting of the log-likelihood tolerance in this domain.

double getSignificanceLevel () const
 Get current setting of the significance level in this domain.

double getLogNormalizationConstant () const
 Get the logarithm to the normalization constant.

TablegetMarginal (const NodeList &nodes) const
 Compute the marginal distribution for the Nodes provided as arguments (which must all be chance nodes) with respect to the (imaginary) joint potential, determined by the current potentials on the junction tree (s) of this Domain.

size_t getMaxNumberOfEMIterations () const
 Retrieve the current maximum number of iterations for the EM algorithm.

size_t getMaxNumberOfSeparators () const
 Retrieve the current maximum number of separators allowed during triangulation.

NodegetNodeByName (const std::string &name) const
 Locate a node in the domain by comparing the given string to the name of all the nodes.

NodeList getNodes () const
 Return the Nodes of this Domain.

NodeList parseNodes (const std::string &filename, ParseListener *errorHandler)
std::pair< size_t, size_t > getNodeSize () const
 Return the size of the displayed nodes.

double getNormalizationConstant () const
 Retrieve the normalization constant from the most recent propagation.

size_t getNumberOfCases () const
 Return the number of cases currently allocated for this domain.

bool hasAttribute (const std::string &key) const
 Test if this Domain contains an attribute with the specified key.

bool hasEvidenceToPropagate () const
 Test if evidence has been entered since last propagation.

bool hasTablesToPropagate () const
 Test for new node tables.

void initialize ()
 Establish the initial values for all tables of this Domain (which must be compiled).

void learnStructure ()
 Learn the structure of a net from a text file.

bool isCompiled () const
 Test whether this Domain is compiled.

bool isCompressed () const
 Test whether this Domain is compressed.

void learnTables ()
 Learn the conditional probability tables for each node in this domain that has an experience table.

void learnClassTables ()
 Perform EM learning on an OOBN.

bool likelihoodIsPropagated () const
 Test if likelihood eveidence has been propagated for this Domain.

size_t newCase ()
 Allocate storage within this domain to a new case.

void propagate (Equilibrium eq=H_EQUILIBRIUM_SUM, EvidenceMode ev=H_MODE_NORMAL)
 Establish the specified equilibrium using the evidence mode indicated for incorporation of evidence on all junction trees in this Domain.

void resetInferenceEngine ()
 Establish the initial state of the inference engine.: sum-equilibrium with no evidence incorporated.

void retractFindings ()
 Retract (all) findings for all nodes in this Domain.

void save (const std::string &filename, Endian format)
 This function is obsolete, since the format variable is no longer used.

void saveAsKB (const std::string &filename)
 Save this Domain as a Hugin Knowledge Base to a file named by the parameter.

void saveAsKB (const std::string &filename, const std::string &password)
 Save this domain as a password protected Hugin Knowledge Base file.

void saveToMemory ()
 Create a copy in memory of the belief and junction tree tables of this Domain (which must be compiled).

void setAttribute (const std::string &key, const std::string &value)
 Insert the key/value pair in the attribute list for this Domain.

void setCaseCount (size_t config, Number count)
 Set the case count for the configuration config to count.

void setConcurrencyLevel (size_t level)
 Set the level of concurrency.

void setGrainSize (size_t size)
 Set the grains size parameter.

void setLogFile (FILE *log)
 Set the file to be used for logging by subsequent compilation and triangulation operations.

void setLogLikelihoodTolerance (double tolerance)
 Specify the tolerance of the log-likelihood.

void setSignificanceLevel (double significancelevel)
 Specify the Significance Level used for the structurel learning aglorithm.

void setMaxNumberOfEMIterations (size_t iterations)
 Set the maximal number of iterations allowed for the EM algorithm.

void setMaxNumberOfSeparators (size_t separators)
 Set the maximal number of separators allowed during triangulation.

void setNodeSize (size_t width, size_t height)
 Set the size of the nodes.

void setNumberOfCases (size_t number)
 Adjust the storage capacity for cases in this domain.

void simulate ()
 Sample a configuration for this Domain with respect to the current distribution.e The current distribution must be in sum-equilibrium and with evidence incorporated in normal mode.

void triangulate (TriangulationMethod tm=H_TM_FILL_IN_WEIGHT)
 Transforms a network into a triangulated graph.

void triangulateWithOrder (const NodeList &order)
 Transforms a network into a triangulated graph using a specified elimination order.

void uncompile ()
 Remove the data structures of this Domain.

void saveAsNet (const std::string &filename)
 Write a NET description of the Domain to a file.

void writeNet (const std::string &filename)
 Write a NET description of the Domain to a file.

void generateTables ()
 Generate tables for all applicable Nodes in this Domain.

void seedRandom (unsigned long seed)
 The random number generator used by HUGIN, generates a set of numbers, which look random, but are in fact deterministic.

AttributeList getAttributes () const
 getAttributes

void saveCase (const std::string &filename)
 Saves all evidence entered in this Domain in a file with the given fileName (if the file exists, it is overwritten).

void parseCase (const std::string &filename, ParseListener *pl)
 Parses the case stored in a file with the given filename and enters the associated findings into this Domain.

void parseCases (const std::string &filename, ParseListener *pl)
 Parses a set of cases, stored in a file with the given filename.

void saveCases (const std::string &filename, const NodeList &nodes, bool caseCounts, const std::string &separator, const std::string &missingData)
 Saves all cases entered in this Domain in a file with the given fileName.

void saveCases (const std::string &filename, const NodeList &nodes, const std::vector< size_t > &cases, bool caseCounts, const std::string &separator, const std::string &missingData)
 Saves the specified cases entered in this Domain in a file with the given fileName.

void saveCases (const std::string &filename, const NodeList *nodes, const int *cases, bool caseCounts, const std::string &separator, const std::string &missingData)
 Saves the specified cases entered in this Domain in a file with the given fileName.


Constructor & Destructor Documentation

HAPI::Domain::Domain const std::string &  filename  )  [explicit]
 

Construct a domain by loading the corresponding Hugin Knowledge Base from file.

Parameters:
filename A Standard C++ Library string.

HAPI::Domain::Domain const std::string &  filename,
const std::string &  password
 

Construct a domain by loading the corresponding password protected Hugin Knowledge Base from file.

If the given password does not match, an exception is thrown.

Parameters:
filename A Standard C++ Library string.
password The password for the file

HAPI::Domain::Domain const std::string &  filename,
ParseListener pl
 

Construct a domain by reading a NET file description.

Parameters:
filename Standard C++ Library string containing the name of the NET file.
pl Pointer to object derived from class ParseListener.


Member Function Documentation

double HAPI::Domain::approximate double  epsilon  ) 
 

Remove "near-zero" probabilities from the clique probability tables.

For each Clique object in this domain, a value delta is computed such that the sum of all elements less than delta in the (discrete part) of the clique table is less than epsilon. These elements (less than delta) are then set to 0.

Parameters:
epsilon The threshold value. Maximal probability mass to eradicate from each clique.
Returns:
A double value which is the sum of all entries in clique probability tables that have been zeroed.

bool HAPI::Domain::cgEvidenceIsPropagated  )  const
 

Test if CG evidence has been propagated for this Domain.

Returns:
boolean

Domain* HAPI::Domain::clone  )  const
 

Clone a Domain object.

This function returns a pointer to a copy of this domain.

void HAPI::Domain::compile  ) 
 

Compile this Domain using the default triangulation method.

If the domain already is triangulated, nothing is changed. The domain must contain at least one chance or decision node.

double HAPI::Domain::compress  ) 
 

Remove the zero entries from the clique and separator tables of the junction trees in this Domain.

Compression can only be applied to (compiled) ordinary belief networks. Continuous nodes are allowed, but compression only applies to configurations of states of the discrete nodes.

Returns:
A double value which indicates a measure of compression achieved. The measure should be less than 1, indicating that the compressed domain requires less space than the uncompressed domain. An output greater than 1 means that the "compressed" domain requires more space than the uncompressed domain.

bool HAPI::Domain::equilibriumIs Equilibrium  eq  )  const
 

Test for Equilibrium type.

If the equilibrium of all junction trees of this Domain is eq, return true.

Parameters:
eq Type of Equilibrium to test for.
Returns:
A boolean.

bool HAPI::Domain::evidenceIsPropagated  )  const
 

Test if evidence has been propagated for this Domain.

Returns:
A boolean.

bool HAPI::Domain::evidenceModeIs EvidenceMode  ev  )  const
 

Test for evidence mode.

Test if the equilibrium of all junction trees of this Domain could have been obtained through a propagation using ev as the evidence incorporation mode.

Parameters:
ev Type of EvidenceMode to test for.
Returns:
boolean

void HAPI::Domain::generateTables  )  [virtual]
 

Generate tables for all applicable Nodes in this Domain.

See also:
NetworkModel::generateTables

Implements HAPI::NetworkModel.

double HAPI::Domain::getApproximationConstant  )  const
 

Return the approximation constant.

The number returned is based on the most recent (explicit or implicit) approximation operation. An implicit approximation takes place when you change some conditional probability tables of acompressed domain, and then perform a propagation operation. Since some (discree) state configurations have been removed from a compressed domain, the probability mass of the remaining configurations will typically be less than 1. This probability mass is returned by getApproximationConstant ().

Returns:
A double expressing the probability mass remaining in the approximated domain.

std::string HAPI::Domain::getAttribute const std::string &  key  )  const [virtual]
 

Return an attrubute value.

Return the value associated with key in the attribute list for this Domain.

Parameters:
key A Standard C++ Library string.
Returns:
A Standard C++ Library string containing the attribute value.

Implements HAPI::NetworkModel.

AttributeList HAPI::Domain::getAttributes  )  const [virtual]
 

getAttributes

See also:
NetworkModel::getAttributes

Implements HAPI::NetworkModel.

Number HAPI::Domain::getCaseCount size_t  config  )  const
 

Retrieve the case count associated with the case config in this domain.

Parameters:
config size_t.

size_t HAPI::Domain::getConcurrencyLevel  )  const
 

Get the current level of concurrency.

Returns:
size_t.
See also:
setConcurrencyLevel

double HAPI::Domain::getConflict  )  const
 

Return the conflict value.

The conflict value is valid for this Domain computed during the most recent propagation. If no propagation has been performed, 1 is returned.

Returns:
A double-precision real value expressing the conflict measure in the domain.

NodeList HAPI::Domain::getEliminationOrder  )  const
 

Return the triangulation order.

A NodeList containing a list of nodes in the order used to triangulate the network of this Domain is returned.

Returns:
NodeList containing Nodes representing the elimination order used.

std::string HAPI::Domain::getFileName  )  const [virtual]
 

Return the file name most recently used for loading or saving this Domain.

Returns:
A Standard C++ Library string.

Implements HAPI::NetworkModel.

size_t HAPI::Domain::getGrainSize  )  const
 

Return the current value of the grain size parameter.

Returns:
Positive integer.

JunctionTreeList HAPI::Domain::getJunctionTrees  )  const
 

Return the JunctionTrees of this Domain.

Returns:
JunctionTreeList.

Table* HAPI::Domain::getMarginal const NodeList &  nodes  )  const
 

Compute the marginal distribution for the Nodes provided as arguments (which must all be chance nodes) with respect to the (imaginary) joint potential, determined by the current potentials on the junction tree (s) of this Domain.

If nodes contains continuous nodes, they must be last in the list. This operation is not allowed on compressed domains.

Parameters:
nodes NodeList containing the Node objects over which to compute the marginal.
Returns:
A Table which contains the marginal distribution over the nodes provided.

Node* HAPI::Domain::getNodeByName const std::string &  name  )  const [virtual]
 

Locate a node in the domain by comparing the given string to the name of all the nodes.

Parameters:
name A Standard C++ string containing the name of the node to be found in this Domain.
Returns:
Reference to a node in the domain carrying the name specified by the input. On error an exception will be thrown.

Implements HAPI::NetworkModel.

NodeList HAPI::Domain::getNodes  )  const [virtual]
 

Return the Nodes of this Domain.

No ordering can be inferred by the user.

Returns:
NodeList containing the Nodes of this Domain.

Implements HAPI::NetworkModel.

std::pair<size_t, size_t> HAPI::Domain::getNodeSize  )  const [virtual]
 

Return the size of the displayed nodes.

Returns:
Standard C++ Library pair<int,int>.

Implements HAPI::NetworkModel.

double HAPI::Domain::getNormalizationConstant  )  const
 

Retrieve the normalization constant from the most recent propagation.

For sum-propagation, the normalization constant is equal to the probability of the evidence propagated. For max-propagation, the normalization constant is the probability of the most probable configuration with the evidence incorporated.

Returns:
A double-precision real number.

bool HAPI::Domain::hasAttribute const std::string &  key  )  const [virtual]
 

Test if this Domain contains an attribute with the specified key.

Parameters:
key A Standar C++ Library string.
Returns:
boolean

Implements HAPI::NetworkModel.

bool HAPI::Domain::hasEvidenceToPropagate  )  const
 

Test if evidence has been entered since last propagation.

Returns:
A boolean.

bool HAPI::Domain::hasTablesToPropagate  )  const
 

Test for new node tables.

Are there any nodes in this Domain having (a conditional probability or utility) table that has changed since the most recent compilation or propagation.

Returns:
boolean

void HAPI::Domain::initialize  ) 
 

Establish the initial values for all tables of this Domain (which must be compiled).

Using this method will erase all evidence previously entered.

bool HAPI::Domain::isCompiled  )  const
 

Test whether this Domain is compiled.

Returns:
bool

bool HAPI::Domain::isCompressed  )  const
 

Test whether this Domain is compressed.

Returns:
bool

void HAPI::Domain::learnClassTables  ) 
 

Perform EM learning on an OOBN.

This requires, that the data matches the domain created from the OOBN, and not the OOBN itself.

bool HAPI::Domain::likelihoodIsPropagated  )  const
 

Test if likelihood eveidence has been propagated for this Domain.

Returns:
bool

size_t HAPI::Domain::newCase  ) 
 

Allocate storage within this domain to a new case.

Returns:
New case index.

void HAPI::Domain::parseCase const std::string &  filename,
ParseListener pl
 

Parses the case stored in a file with the given filename and enters the associated findings into this Domain.

All existing evidence in the Domain is retracted before entering the case findings.

Parameters:
filename the name of the file containing the case.
pl the ParseListener used for handling parse errors.

void HAPI::Domain::parseCases const std::string &  filename,
ParseListener pl
 

Parses a set of cases, stored in a file with the given filename.

The found cases are entered into the Domain.

Parameters:
filename the name of the file containing the case.
pl the ParseListener used for handling parse errors.

NodeList HAPI::Domain::parseNodes const std::string &  filename,
ParseListener errorHandler
[virtual]
 

See also:
NetworkModel::parseNodes

Implements HAPI::NetworkModel.

void HAPI::Domain::propagate Equilibrium  eq = H_EQUILIBRIUM_SUM,
EvidenceMode  ev = H_MODE_NORMAL
 

Establish the specified equilibrium using the evidence mode indicated for incorporation of evidence on all junction trees in this Domain.

Also, revised beliefs will be computed for all nodes.

Parameters:
eq Equilibrium type. Defaults to H_EQUILIBRIUM_SUM.
ev EvidenceMode type. Defaults to H_MODE_NORMAL.

void HAPI::Domain::resetInferenceEngine  ) 
 

Establish the initial state of the inference engine.: sum-equilibrium with no evidence incorporated.

Any propagated findings will thus be removed from the junction tree potentials, but entered findings will still be "registred" (i.e., they will be incorporated in the next propagation).

void HAPI::Domain::save const std::string &  filename,
Endian  format
 

This function is obsolete, since the format variable is no longer used.

Please use the Domain::saveAsKB (const std::string& filename) function instead.

Save this Domain as a Hugin Knowledge Base. to a file named by the parameter. The byte order of the Hugin KB is determined by the given format. If this domain is compiled, it can only be saved if the current equilibrium is "sum", and the current evidence incorporation mode is "normal".

Parameters:
filename Name of the file to save the knowledge base into.
format Byte-order in the saved file.

void HAPI::Domain::saveAsKB const std::string &  filename,
const std::string &  password
 

Save this domain as a password protected Hugin Knowledge Base file.

Parameters:
filename Name of the file to save the knowledge base into.
password The password for the file.

void HAPI::Domain::saveAsKB const std::string &  filename  ) 
 

Save this Domain as a Hugin Knowledge Base to a file named by the parameter.

If this domain is compiled, it can only be saved if the current equilibrium is "sum", and the current evidence incorporation mode is "normal".

Parameters:
filename Name of the file to save the knowledge base into.

void HAPI::Domain::saveAsNet const std::string &  filename  )  [virtual]
 

Write a NET description of the Domain to a file.

Parameters:
filename A Standard C++ Library string containing the name of the file to write.
See also:
NetworkModel::saveAsNet

Implements HAPI::NetworkModel.

void HAPI::Domain::saveCase const std::string &  filename  ) 
 

Saves all evidence entered in this Domain in a file with the given fileName (if the file exists, it is overwritten).

Parameters:
filename the name of the file in which the case is going to be saved.

void HAPI::Domain::saveCases const std::string &  filename,
const NodeList *  nodes,
const int *  cases,
bool  caseCounts,
const std::string &  separator,
const std::string &  missingData
 

Saves the specified cases entered in this Domain in a file with the given fileName.

This form of the saveCases method is deprecated - use one of the other forms instead.

void HAPI::Domain::saveCases const std::string &  filename,
const NodeList &  nodes,
const std::vector< size_t > &  cases,
bool  caseCounts,
const std::string &  separator,
const std::string &  missingData
 

Saves the specified cases entered in this Domain in a file with the given fileName.

Parameters:
filename The name of the file in which the cases will be saved (if the file exists, it is overwritten).
nodes A list of the nodes which are to be included in the file.
cases A list of indexes of cases to be included in the file.
caseCounts If true, include case counts in the data file. If false, case counts will not be included.
separator The string used to separate the items in the file.
missingData The string used to represent missing data.

void HAPI::Domain::saveCases const std::string &  filename,
const NodeList &  nodes,
bool  caseCounts,
const std::string &  separator,
const std::string &  missingData
 

Saves all cases entered in this Domain in a file with the given fileName.

Parameters:
filename The name of the file in which the cases will be saved (if the file exists, it is overwritten).
nodes A list of the nodes which are to be included in the file.
caseCounts If true, include case counts in the data file. If false, case counts will not be included.
separator The string used to separate the items in the file.
missingData The string used to represent missing data.

void HAPI::Domain::saveToMemory  ) 
 

Create a copy in memory of the belief and junction tree tables of this Domain (which must be compiled).

This operation can only be performed if the current equilibrium is "sum", the current evidence mode is "normal", and no CG evidence has been incorporated.

void HAPI::Domain::seedRandom unsigned long  seed  ) 
 

The random number generator used by HUGIN, generates a set of numbers, which look random, but are in fact deterministic.

However, the set of numbers depend on the seed of the random generator. This can be set by this function.

Parameters:
seed The seed which determines the outcome of the random number generator.

void HAPI::Domain::setAttribute const std::string &  key,
const std::string &  value
[virtual]
 

Insert the key/value pair in the attribute list for this Domain.

If the key is already defined, the value is updated. If no value is provided, the attribute is removed.

Parameters:
key A Standard C++ Library string.
value A Standard C++ Library string.

Implements HAPI::NetworkModel.

void HAPI::Domain::setCaseCount size_t  config,
Number  count
 

Set the case count for the configuration config to count.

Parameters:
config long.
count double.

void HAPI::Domain::setConcurrencyLevel size_t  level  ) 
 

Set the level of concurrency.

The level of concurrency specifies the maximum number of threads to create when performing a specific table operation. Setting the level of concurrency to 1 will cause all table operations to be performed sequentially. The initial parameter value is 1.

Parameters:
level Unsigned integer.

void HAPI::Domain::setGrainSize size_t  size  ) 
 

Set the grains size parameter.

The grain size parameter specifies a lower limit of the tasks to be performed by each thread. The size of a task is approximately equal to the number of floating-point operations needed to perform the task (e.g., the number of elements to sum when performing a marginalization task).

The initial value of the grain size parameter is 10000.

Parameters:
size Unsigned integer.

void HAPI::Domain::setLogFile FILE *  log  )  [virtual]
 

Set the file to be used for logging by subsequent compilation and triangulation operations.

Parameters:
log File pointer to an opened file to be used as log. log must be a text file opened for writing or appending. Writing is done sequentially.

Implements HAPI::NetworkModel.

void HAPI::Domain::setLogLikelihoodTolerance double  tolerance  ) 
 

Specify the tolerance of the log-likelihood.

Terminate the EM learning when the relative difference between the log-likelihood of two successive iterations becomes less than tolerance.

Parameters:
tolerance double.

void HAPI::Domain::setMaxNumberOfEMIterations size_t  iterations  ) 
 

Set the maximal number of iterations allowed for the EM algorithm.

The algorithm termnates when this number is reached or when the relative improvement becomes lower than the log-likelihood tolerance.

Parameters:
iterations Maximum allowed number of iterations.

void HAPI::Domain::setMaxNumberOfSeparators size_t  separators  ) 
 

Set the maximal number of separators allowed during triangulation.

Parameters:
separators Maximum number of separators allowed durring triangulation.

void HAPI::Domain::setNodeSize size_t  width,
size_t  height
[virtual]
 

Set the size of the nodes.

Parameters:
width long
height long

Implements HAPI::NetworkModel.

void HAPI::Domain::setNumberOfCases size_t  number  ) 
 

Adjust the storage capacity for cases in this domain.

Parameters:
number Storage capacity.

void HAPI::Domain::setSignificanceLevel double  significancelevel  ) 
 

Specify the Significance Level used for the structurel learning aglorithm.

Parameters:
significancelevel double.

void HAPI::Domain::triangulate TriangulationMethod  tm = H_TM_FILL_IN_WEIGHT  ) 
 

Transforms a network into a triangulated graph.

First, the network of this Domain is tranformed into its moral graph, and then this moral graph is triangulated using the triangulation method tm.

Parameters:
tm TriangulationMethod

void HAPI::Domain::triangulateWithOrder const NodeList &  order  ) 
 

Transforms a network into a triangulated graph using a specified elimination order.

First, the network of this Domain is transformed into its moral graph. Second, this moral graph is triangulated using the Nodes in the NodeList order as elimination sequence. order must contain each chance and decision node of this Domain exactly once and it must respect the restrictions for influence diagrams and networks containing continuous chance nodes.

Parameters:
order NodeList containing the Nodes of the network in the order of elimination.

void HAPI::Domain::uncompile  ) 
 

Remove the data structures of this Domain.

The data structures are produced by Domain::compile (), Domain::triangulate (), and Domain::triangulateWithOrder (). Note that any references to objects within the compiled structure (e.g., Clique and JunctionTree objects) are invalidated by a call to uncompile (). Also note that many of the editing functions automatically performs an uncompile () operation. When this happens, the domain must be compiled (using Domain::compile ()) before it can be used for inference.

void HAPI::Domain::writeNet const std::string &  filename  ) 
 

Write a NET description of the Domain to a file.

This method is deprecated - use saveAsNet instead.


Copyright Hugin Expert A/S 1993-2004