|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object salvo.jesus.graph.VertexImpl edu.ksu.cis.kdd.util.graph.Node edu.ksu.cis.bnj.bbn.BBNNode
A wrapper for BBNNode. Contains query-related functions.
The constants (NORMAL, UTILITY, DECISION) here define the node types. Note that we still allow evidence values to be loaded in the node in any type.
Field Summary | |
protected BBNCPF |
cpf
We store the PDF in a hashtable. |
static int |
DECISION
Denotes whether this node is a decision node |
protected java.lang.Object |
evidenceValue
This is the node's evidence value. |
static int |
NORMAL
Denotes whether this node is a normal node |
protected int |
type
Sets the node type. |
static int |
UTILITY
Denotes whether this node is a utility node |
protected BBNValue |
values
Set of possible values of the node (or a function that denotes the range of values, if it is continuous case). |
Fields inherited from class edu.ksu.cis.kdd.util.graph.Node |
name, owner, property |
Fields inherited from class salvo.jesus.graph.VertexImpl |
object |
Constructor Summary | |
BBNNode()
|
|
BBNNode(Graph owner,
java.lang.String name)
|
Method Summary | |
java.lang.Object |
clone()
Clone the node. |
boolean |
equals(java.lang.Object o)
Equals |
BBNCPF |
getCPF()
Returns the CPF. |
double |
getCPFValue(java.util.Hashtable values)
Queries to the CPT (or CPF, in case of continuous value). |
java.lang.Object |
getEvidenceValue()
Returns the evidence value. null means this node is not an evidence node |
java.util.Hashtable |
getParentsEvidenceSet()
|
int |
getType()
Returns the type. |
BBNValue |
getValues()
Returns the value(s). |
boolean |
isDecision()
To enquire whether this node is a decision node |
boolean |
isEvidence()
Check whether this node is an evidence node or not |
boolean |
isQuery()
Check whether this node is a query node or not. |
boolean |
isUtility()
To enquire whether this node is a utility node |
void |
putCPFValue(java.util.Hashtable q,
BBNPDF v)
Populating the conditional probability function (CPF) |
double |
query(java.util.Hashtable v)
An alias to getCPFValue |
java.util.List |
queryColumn(java.util.Hashtable values)
|
void |
reconstructCPF()
|
void |
removeCPFValue(java.util.Hashtable q)
Removing a specific entry from CPF. |
void |
resetCache()
Reset the cache |
void |
resetCPF()
Resets the CPF to null |
void |
setCPF(BBNCPF cpf)
Sets the CPF. |
void |
setCPF(java.util.Hashtable cpf)
Sets the CPF. |
void |
setEvidenceValue(java.lang.Object evidenceValue)
Sets the evidence value. |
void |
setType(int type)
Sets the type. |
void |
setValues(BBNValue value)
Sets the value(s). |
java.lang.String |
toVerboseString()
To dump more elaborate info. |
void |
unsetEvidenceValue()
Unsets the evidence value. |
Methods inherited from class edu.ksu.cis.kdd.util.graph.Node |
getAncestors, getChildren, getChildrenNames, getDescendants, getLabel, getName, getOwner, getParentNames, getParents, getProperty, getProperty, hashCode, putProperty, removeProperty, setName, setOwner, setProperty, toString |
Methods inherited from class salvo.jesus.graph.VertexImpl |
getObject, hasLabel, setLabel, setObject |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NORMAL
public static final int UTILITY
public static final int DECISION
protected java.lang.Object evidenceValue
protected BBNValue values
protected int type
protected BBNCPF cpf
Constructor Detail |
public BBNNode(Graph owner, java.lang.String name)
public BBNNode()
Method Detail |
public boolean equals(java.lang.Object o)
equals
in class Node
Object.equals(Object)
public java.lang.Object getEvidenceValue()
public void setEvidenceValue(java.lang.Object evidenceValue)
evidenceValue
- The evidence value to setpublic void unsetEvidenceValue()
public boolean isEvidence()
public java.util.Hashtable getParentsEvidenceSet()
public boolean isQuery()
public void reconstructCPF()
public BBNValue getValues()
public void setValues(BBNValue value)
value
- The value to setpublic void resetCache()
public double getCPFValue(java.util.Hashtable values)
values
- The query values in a hash table
public double query(java.util.Hashtable v)
v
-
getCPFValue(Hashtable)
public void putCPFValue(java.util.Hashtable q, BBNPDF v)
q
- The queryv
- The actual valuepublic void removeCPFValue(java.util.Hashtable q)
q
- the querypublic java.util.List queryColumn(java.util.Hashtable values)
public int getType()
public void setType(int type)
type
- The type to setpublic boolean isDecision()
public boolean isUtility()
public BBNCPF getCPF()
public void setCPF(java.util.Hashtable cpf)
cpf
- The cpf to setpublic void setCPF(BBNCPF cpf)
cpf
- The cpf to setpublic void resetCPF()
public java.lang.String toVerboseString()
public java.lang.Object clone()
Object.clone()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |