|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCOM.hugin.HAPI.NetworkModel
The NetworkModel class is an abstract class with two subclasses: Domain.java and Class.java.
Nested Class Summary | |
static class |
NetworkModel.Category
The Category class is used to attach a category tag to the Nodes of Classes and Domains. |
static class |
NetworkModel.Constraint
The Constraint class is used to represent possible domain knowledge about a particular edge between a pair of variables. |
static class |
NetworkModel.Endian
The Endian class is used to represent the byte-order used when saving a Hugin Knowledge Base (HKB) file. |
static class |
NetworkModel.Kind
The Kind class is used to attach a sub-category tag to the chance nodes of Classes and Domains. |
Field Summary | |
static NetworkModel.Category |
H_CATEGORY_CHANCE
Represents the Category tag attached to ChanceNodes. |
static NetworkModel.Category |
H_CATEGORY_DECISION
Represents the Category tag attached to DecisionNodes. |
static NetworkModel.Category |
H_CATEGORY_ERROR
Represents an unknown or erroneous Category tag. |
static NetworkModel.Category |
H_CATEGORY_INSTANCE
Represents the Category tag attached to InstanceNodes. |
static NetworkModel.Category |
H_CATEGORY_UTILITY
Represents the Category tag attached to UtilityNodes. |
static NetworkModel.Constraint |
H_CONSTRAINT_BACKWARD_EDGE_FORBIDDEN
Represents the domain knowledge that a directed edge is forbidden from the second to the first Node in an ordered pair of Nodes. |
static NetworkModel.Constraint |
H_CONSTRAINT_BACKWARD_EDGE_REQUIRED
Represents the domain knowledge that a directed edge is required from the second to the first Node in an ordered pair of Nodes. |
static NetworkModel.Constraint |
H_CONSTRAINT_EDGE_FORBIDDEN
Represents the domain knowledge that an edge is forbidden between a particular pair of Nodes. |
static NetworkModel.Constraint |
H_CONSTRAINT_EDGE_REQUIRED
Represents the domain knowledge that an edge is required for a particular pair of Nodes. |
static NetworkModel.Constraint |
H_CONSTRAINT_ERROR
Used to denote error returns from the getEdgeConstraint method. |
static NetworkModel.Constraint |
H_CONSTRAINT_FORWARD_EDGE_FORBIDDEN
Represents the domain knowledge that a directed edge is forbidden from the first to the second Node in an ordered pair of Nodes. |
static NetworkModel.Constraint |
H_CONSTRAINT_FORWARD_EDGE_REQUIRED
Represents the domain knowledge that a directed edge is required from the first to the second Node in an ordered pair of Nodes. |
static NetworkModel.Constraint |
H_CONSTRAINT_NONE
Represents that no domain knowledge is available for a particular pair of Nodes. |
static NetworkModel.Endian |
H_ENDIAN_BIG
Represents the Endian value corresponding to big-endian byte order. |
static NetworkModel.Endian |
H_ENDIAN_HOST
Represents the Endian value corresponding the byte order used by the host machine. |
static NetworkModel.Endian |
H_ENDIAN_LITTLE
Represents the Endian value corresponding to little-endian byte order. |
static NetworkModel.Kind |
H_KIND_CONTINUOUS
Represents the Kind tag attached to continuous chance nodes. |
static NetworkModel.Kind |
H_KIND_DISCRETE
Represents the Kind tag attached to discrete chance nodes. |
static NetworkModel.Kind |
H_KIND_ERROR
Represents an unknown or erroneous Kind tag. |
Constructor Summary | |
NetworkModel()
|
Method Summary | |
void |
closeLogFile()
Closes the log file associated with this NetworkModel. |
abstract void |
delete()
Deletes this NetworkModel. |
void |
generateTables()
Generates the conditional probability tables for all nodes of this NetworkModel. |
java.lang.String |
getAttribute(java.lang.String key)
Returns an attribute value. |
java.util.LinkedList |
getAttributes()
Returns the list of attributes associated with this NetworkModel. |
java.lang.String |
getFileName()
Returns the file name most recently used for loading or saving this NetworkModel. |
java.lang.String |
getLogFile()
Returns the name of the most recent log file opened by openLogFile(String, boolean) or
openLogFile(String) . |
Node |
getNodeByName(java.lang.String nodeName)
Returns a Node by name. |
NodeList |
getNodes()
Returns the Nodes of this NetworkModel. |
java.awt.geom.Point2D |
getNodeSize()
Returns the size of the displayed nodes. |
java.lang.Object |
getUserData()
Returns the value stored within the user data slot of this NetworkModel. |
static double |
INFINITY()
Returns infinity. |
void |
openLogFile(java.lang.String fileName)
Opens a log file to be associated with this NetworkModel. |
void |
openLogFile(java.lang.String fileName,
boolean append)
Opens a log file to be associated with this NetworkModel. |
NodeList |
parseNodes(java.lang.String fileName,
ParseListener parseListener)
Parses file named fileName and returns a
NodeList. |
void |
saveAsNet(java.lang.String fileName)
Writes a NET description of this NetworkModel to a file. |
void |
setAttribute(java.lang.String key,
java.lang.String value)
Inserts the key/value pair in the attribute list for this NetworkModel. |
void |
setNodeSize(java.awt.geom.Point2D newNodeSize)
Sets the size of the nodes. |
void |
setUserData(java.lang.Object data)
Sets the user data field of this NetworkModel. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final NetworkModel.Category H_CATEGORY_INSTANCE
public static final NetworkModel.Category H_CATEGORY_CHANCE
public static final NetworkModel.Category H_CATEGORY_DECISION
public static final NetworkModel.Category H_CATEGORY_UTILITY
public static final NetworkModel.Category H_CATEGORY_ERROR
getCategory()
method is called for a Node
that has been deleted.
public static final NetworkModel.Kind H_KIND_DISCRETE
public static final NetworkModel.Kind H_KIND_CONTINUOUS
public static final NetworkModel.Kind H_KIND_ERROR
getKind()
method is called for a Node that has
been deleted.
public static final NetworkModel.Endian H_ENDIAN_HOST
public static final NetworkModel.Endian H_ENDIAN_BIG
public static final NetworkModel.Endian H_ENDIAN_LITTLE
public static final NetworkModel.Constraint H_CONSTRAINT_NONE
public static final NetworkModel.Constraint H_CONSTRAINT_EDGE_REQUIRED
public static final NetworkModel.Constraint H_CONSTRAINT_FORWARD_EDGE_REQUIRED
public static final NetworkModel.Constraint H_CONSTRAINT_BACKWARD_EDGE_REQUIRED
public static final NetworkModel.Constraint H_CONSTRAINT_EDGE_FORBIDDEN
public static final NetworkModel.Constraint H_CONSTRAINT_FORWARD_EDGE_FORBIDDEN
public static final NetworkModel.Constraint H_CONSTRAINT_BACKWARD_EDGE_FORBIDDEN
public static final NetworkModel.Constraint H_CONSTRAINT_ERROR
getEdgeConstraint
method.
Constructor Detail |
public NetworkModel()
Method Detail |
public abstract void delete() throws ExceptionHugin
ExceptionHugin
public java.lang.String getAttribute(java.lang.String key) throws ExceptionHugin
key
- the key for which the attribute value is returned (a
String).
ExceptionHugin
public java.util.LinkedList getAttributes() throws ExceptionHugin
ExceptionHugin
public void generateTables() throws ExceptionHugin
DiscreteChanceNodes
and UtilityNodes
also
apply here.
ExceptionHugin
public java.lang.String getFileName() throws ExceptionHugin
ExceptionHugin
public NodeList getNodes() throws ExceptionObjectNotAlive
ExceptionObjectNotAlive
public Node getNodeByName(java.lang.String nodeName) throws ExceptionHugin
nodeName
- a string containing the name of the Node to be
found in this NetworkModel.
ExceptionHugin
public java.awt.geom.Point2D getNodeSize() throws ExceptionHugin
ExceptionHugin
public void setAttribute(java.lang.String key, java.lang.String value) throws ExceptionHugin
key
- The key identifying the attribute to be updated (a String).value
- The value of the attribute (a String).
ExceptionHugin
public void openLogFile(java.lang.String fileName, boolean append) throws ExceptionHugin
fileName
- the name of the log file.append
- if 'true' opens the log file in append mode;
otherwise, opens in create mode.
ExceptionHugin
public void openLogFile(java.lang.String fileName) throws ExceptionHugin
fileName
- the name of the log file.
ExceptionHugin
public void closeLogFile() throws ExceptionHugin
ExceptionHugin
public java.lang.String getLogFile() throws ExceptionObjectNotAlive
openLogFile(String, boolean)
or
openLogFile(String)
.
String
or null
(if no log
file has been opened or the most recent call to openLogFile()
has been succeeded
by a call to closeLogFile()
.)
ExceptionObjectNotAlive
public void setNodeSize(java.awt.geom.Point2D newNodeSize) throws ExceptionHugin
newNodeSize
- a Point2D object with width and height of
the Nodes in this NetworkModel.
ExceptionHugin
public java.lang.Object getUserData() throws ExceptionObjectNotAlive
Also note that when you delete a domain, Hugin does not attempt to delete the data pointed to by the user data slot. It is the responsibility of the user.
ExceptionObjectNotAlive
public void setUserData(java.lang.Object data) throws ExceptionHugin
data
- Pointer to user-defined data associated with this
NetworkModel.
ExceptionHugin
public void saveAsNet(java.lang.String fileName) throws ExceptionHugin
fileName
- the name of the file in which to store the NET
description (a String).
ExceptionHugin
public NodeList parseNodes(java.lang.String fileName, ParseListener parseListener) throws ExceptionHugin
fileName
and returns a
NodeList. This is used for reading an elimination order from a
file.
fileName
- a string containing the name of a file of
node names.parseListener
- the ParseListener used for handling
parse errors.
ExceptionHugin
public static double INFINITY()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |