class Class : public NetworkModel

The Class class is one of the principal structures in HUGIN

Inheritance:


Public Methods

Class(ClassCollection *cColl) throw(ExceptionHugin)
Create a new Class object, contained in the given ClassCollection
void saveAsNet(const std::string& filename) throw(ExceptionHugin)
std::string getAttribute(std::string& key) const throw( ExceptionHugin )
std::string getFileName() throw( ExceptionHugin )
NodeList getNodes() const throw(ExceptionHugin)
Node* getNodeByName(const std::string& name) const throw( ExceptionHugin )
void setAttribute(std::string& key, std::string& value) throw(ExceptionHugin)
void setLogFile(FILE *log) throw( ExceptionHugin )
bool hasAttribute(const std::string& key) throw(ExceptionHugin)
std::pair <unsigned int,unsigned int> getNodeSize() throw(ExceptionHugin)
void setNodeSize(unsigned int width, unsigned int height) throw(ExceptionHugin)
std::vector <Attribute*> getAttributes() throw( ExceptionHugin )
void generateTables() throw( ExceptionHugin )
void setName(const std::string& name) throw(ExceptionHugin)
Set the name of this Class
void setName(char* name) throw(ExceptionHugin)
Set the name of this Class
std::string getName() const throw(ExceptionHugin)
Retrieve the name of this Class
NodeList getInputs() throw(ExceptionHugin)
Get a list of all Nodes in this Class, which have been added to the inputs of the Class
NodeList getOutputs() throw(ExceptionHugin)
Get a list of all Nodes in this Class, which have been added to the outputs of the Class
NodeList getInstances() throw(ExceptionHugin)
Get a list of all InstanceNodes created from this Class
Domain* createDomain() throw(ExceptionHugin)
Instantiate this Class to a Domain
ClassCollection* getClassCollection() throw(ExceptionHugin)
Return the ClassCollection, in which this Class is contained

Inherited from NetworkModel:

Public Methods

void* getUserData() throw(ExceptionHugin)
void setUserData(void *data) throw(ExceptionHugin)

Documentation

The Class class is one of the principal structures in HUGIN. When using the Object Oriented features of HUGIN, Classes must be used for creating the networks. Furthermore, all Classes which are to be used as instances in a given Class must be contained in the same ClassCollection as this.

Classes can not, however, be used for inference. For this purpose, it is necessary to instantiate the Class into a Domain, which can be used for performing inference.

Class(ClassCollection *cColl) throw(ExceptionHugin)
Create a new Class object, contained in the given ClassCollection.
Parameters:
cColl - A pointer to the ClassCollection in which the newly constructed Class should be placed.

void saveAsNet(const std::string& filename) throw(ExceptionHugin)
See Also:
NetworkModel::saveAsNet

std::string getAttribute(std::string& key) const throw( ExceptionHugin )
See Also:
NetworkModel::getAttribute

std::string getFileName() throw( ExceptionHugin )
See Also:
NetworkModel::getFileName

NodeList getNodes() const throw(ExceptionHugin)
See Also:
NetworkModel::getNodes

Node* getNodeByName(const std::string& name) const throw( ExceptionHugin )
See Also:
NetworkModel::getNodeByName

void setAttribute(std::string& key, std::string& value) throw(ExceptionHugin)
See Also:
NetworkModel::setAttribute

void setLogFile(FILE *log) throw( ExceptionHugin )
See Also:
NetworkModel::setLogFile

bool hasAttribute(const std::string& key) throw(ExceptionHugin)
See Also:
NetworkModel::hasAttribute

std::pair <unsigned int,unsigned int> getNodeSize() throw(ExceptionHugin)
See Also:
NetworkModel::getNodeSize

void setNodeSize(unsigned int width, unsigned int height) throw(ExceptionHugin)
See Also:
NetworkModel::setNodeSize

std::vector <Attribute*> getAttributes() throw( ExceptionHugin )
See Also:
NetworkModel::getAttributes

void generateTables() throw( ExceptionHugin )
See Also:
NetworkModel::generateTables

void setName(const std::string& name) throw(ExceptionHugin)
Set the name of this Class
Parameters:
name - The name which is given to this Class

void setName(char* name) throw(ExceptionHugin)
Set the name of this Class
Parameters:
name - The name which is given to this Class

std::string getName() const throw(ExceptionHugin)
Retrieve the name of this Class. If no name has been assigned to the Class, one will be automatically generated by HUGIN.

Returns:
The name of this Class

NodeList getInputs() throw(ExceptionHugin)
Get a list of all Nodes in this Class, which have been added to the inputs of the Class
Returns:
A NodeList containing all input nodes for the Class.
See Also:
Node::addToInputs

NodeList getOutputs() throw(ExceptionHugin)
Get a list of all Nodes in this Class, which have been added to the outputs of the Class
Returns:
A NodeList containing all output nodes for the Class.
See Also:
Node::addToOutputs

NodeList getInstances() throw(ExceptionHugin)
Get a list of all InstanceNodes created from this Class
Returns:
A NodeList containing the instances
See Also:
InstanceNode

Domain* createDomain() throw(ExceptionHugin)
Instantiate this Class to a Domain. This is required before any inference can be made. This operation will "unfold" the object oriented parts of the network, so that the Domain will be a standard HUGIN Domain.

Note: The Nodes in the Domain will not be immediately identifiable as the Nodes from the Class (i.e., they will not have meaningfull names). To determine what Node in the Class a given domain-node is derived from, you should use Node::getSource().

Returns:
The newly constructed Domain.
See Also:
Node::getSource

ClassCollection* getClassCollection() throw(ExceptionHugin)
Return the ClassCollection, in which this Class is contained. A Class can only be contained in a single ClassCollection, so if a given Class definition is needed in more than one ClassCollection, a copy of the Class must be created in each ClassCollection, and changes to one version of the Class will not be reflected in the others.
Returns:
The ClassCollection containing this Class


This class has no child classes.
See Also:
ClassCollection
Domain
Node

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de