|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--bbn.Node
Title: Node.java Description: Core Bayesian Network class Copyright: Copyright (c) 2001 Company: KSU / KDD
| Field Summary | |
int |
pathLength
|
| Constructor Summary | |
Node(BBN newNetwork)
Node constructs the node and initializes the values. |
|
| Method Summary | |
void |
addChild(Node child)
addChild adds a child to the node. |
void |
addParent(Node parent)
addParent adds a parent to the node. |
void |
addProbability(java.lang.Double newProbability)
addProbability adds a new probability to the probability vector. |
void |
addValue(java.lang.String value)
addValue adds a new value to the set of values the node can have. |
Node |
copy(BBN newNetwork)
Creates a copy of the node. |
void |
empty_parentlist()
|
int |
getArity()
getArity returns the arity (number of possible values) of the node. |
Node |
getChild(int index)
getChild returns the child at location index. |
java.util.Vector |
getChildren()
getChildren returns the vector of Node objects containing the node's children |
java.util.Vector |
getChildrenNames()
getChildrenNames returns the vector of Strings containing the node's children's names. |
java.lang.String |
getInstant()
Deprecated. The whole point of NodeManager is to handle instantiations. It handles it with integers rather than strings, which makes projects run much faster. |
java.lang.String |
getName()
getName returns the name of the node. |
BBN |
getNetwork()
getNetwork returns the host bayesian network. |
Node |
getParent(int index)
getParent returns the parent at location index. |
java.lang.String |
getParentName(int index)
|
java.util.Vector |
getParentNames()
|
java.util.Vector |
getParents()
getParents returns the vector of Node objects containing the node's parents |
java.util.Vector |
getProbabilities()
getProbabilities returns the vector of Node objects containing the node's probabilities |
double |
getProbability(int index)
getProbability returns the probability at location index. |
double |
getProbability(int column,
int row)
|
int |
getStateIndex(java.lang.String string)
getStateIndex matches a given string to the location in the possible value list. |
java.lang.String |
getStateName(int index)
getStateName will return the requested state index's name that was given in the network file. |
java.util.Vector |
getStateNames()
getStateNames will return all possible state names. |
java.util.Vector |
getTable(int splitTableIndex,
BBN nodesGroup)
|
java.lang.Double |
getValue(int index)
|
java.util.Vector |
getValues()
getValues returns the vector of all possible instantiations of the node |
double |
getX()
getX returns the X coordinate. |
double |
getY()
getY returns the Y coordinate. |
boolean |
isProcessed()
|
void |
labelProcessed()
|
int |
numChildren()
numChildren returns the number of children this node has |
int |
numParents()
numParents returns the number of parents this node has. |
void |
print()
print prints the name of the node. |
void |
printStateNames()
|
void |
printVerbose()
|
void |
setChildrenList(java.util.Vector children)
|
void |
setInstant(java.lang.String instant)
Deprecated. The whole point of NodeManager is to handle instantiations. It handles it with integers rather than strings, which makes projects run much faster. |
void |
setName(java.lang.String name)
setName sets the name of the node. |
void |
setParentList(java.util.Vector parents)
|
void |
setParentNames(java.util.Vector names)
|
void |
setPossibleValues(java.util.Vector values)
|
void |
setProbabilities(java.util.Vector newProbabilities)
setProbabilities will set the probability vector to the passed vector. |
void |
setProbability(int index,
java.lang.Double value)
|
void |
setValue(int index,
java.lang.Double value)
|
void |
setX(double x)
setX sets the X coordinate |
void |
setY(double y)
setY sets the Y coordinate. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int pathLength
| Constructor Detail |
public Node(BBN newNetwork)
newNetwork - - the node's parent Bayesian Network.| Method Detail |
public Node copy(BBN newNetwork)
newNetwork - - the network this copy will belong toBBN.copypublic int getArity()
public void setPossibleValues(java.util.Vector values)
public void setChildrenList(java.util.Vector children)
public void setParentList(java.util.Vector parents)
public void setParentNames(java.util.Vector names)
public void setProbability(int index,
java.lang.Double value)
public void setValue(int index,
java.lang.Double value)
public java.lang.Double getValue(int index)
public void addProbability(java.lang.Double newProbability)
newProbability - - the new probability to add.public int getStateIndex(java.lang.String string)
string - - the string being matchedpublic void printStateNames()
public void print()
public void setInstant(java.lang.String instant)
instant - - the new instantiationpublic java.lang.String getInstant()
public void setProbabilities(java.util.Vector newProbabilities)
newProbabilities - - the new probabilities vectorpublic java.lang.String getStateName(int index)
index - - the index of the state being requested.public java.util.Vector getStateNames()
public BBN getNetwork()
public Node getParent(int index)
index - - the requested parent indexpublic java.lang.String getParentName(int index)
public java.util.Vector getParents()
public java.util.Vector getParentNames()
public void empty_parentlist()
public Node getChild(int index)
index - - the requested child indexpublic java.util.Vector getChildren()
public java.util.Vector getChildrenNames()
public double getProbability(int index)
index - - the requested probability index
public double getProbability(int column,
int row)
public java.util.Vector getProbabilities()
public java.util.Vector getValues()
public java.lang.String getName()
public void setName(java.lang.String name)
name - - the new name.public void setX(double x)
x - - the X coordinatepublic double getX()
public void addValue(java.lang.String value)
value - - the new valuepublic void addChild(Node child)
child - - the child being added to the node.public void addParent(Node parent)
public void setY(double y)
y - - the y coordinate.public double getY()
public int numParents()
public int numChildren()
public void labelProcessed()
public boolean isProcessed()
public java.util.Vector getTable(int splitTableIndex,
BBN nodesGroup)
public void printVerbose()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||