unbbayes.prs.bn
Class ProbabilisticNode

java.lang.Object
  extended by unbbayes.prs.Node
      extended by unbbayes.prs.bn.TreeVariable
          extended by unbbayes.prs.bn.ProbabilisticNode
All Implemented Interfaces:
Serializable, Comparable<Node>, IRandomVariable, INode
Direct Known Subclasses:
LearningNode

public class ProbabilisticNode
extends TreeVariable
implements IRandomVariable, Serializable

Represents probabilistic variable.

Author:
Michael Onishi, Rommel Carvalho
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class unbbayes.prs.Node
Node.NodeNameChangedEvent, Node.NodeNameChangedListener, Node.SetList<E>
 
Field Summary
 
Fields inherited from class unbbayes.prs.bn.TreeVariable
cliqueAssociado, marginalList
 
Fields inherited from class unbbayes.prs.Node
backColor, CONTINUOUS_NODE_TYPE, DECISION_NODE_TYPE, DEFAULT_SIZE, DESCRIPTION_TYPE, DISPLAY_MODE_BAR, DISPLAY_MODE_ELLIPSE, EXPLANATION_TYPE, infoestados, label, mean, name, nodeNameChangedListenerList, parents, position, PROBABILISTIC_NODE_TYPE, size, sizeIsVariable, sizeVariable, standardDeviation, states, UTILITY_NODE_TYPE
 
Constructor Summary
ProbabilisticNode()
          Constructs a ProbabilisticNode with an initialized table and an incremented DrawElement.
 
Method Summary
 void appendState(String state)
          Inserts a new state and updates the affected tables.
 ProbabilisticNode basicClone()
           
 Object clone()
           
 ProbabilisticNode clone(double raio)
          Copia as caracterÔøΩsticas principais para o nÔøΩ desejado
static Color getDescriptionColor()
          Returns node's color.
static Color getExplanationColor()
          Gets the explanationColor.
 PotentialTable getProbabilityFunction()
          Returns the probabilistic table of this variable.
 int getType()
          Method to extract node's type.
protected  void marginal()
          Calculates the margin of this node.
 void removeAllStates()
          Remove all, but one, states by removing the last state until there is just one left.
 void removeLastState()
          Removes the newest state and updates the affected tables.
static void setDescriptionColor(int c)
          Changes the description node's color.
static void setExplanationColor(int c)
          Changes the explanation's node's color.
 
Methods inherited from class unbbayes.prs.bn.TreeVariable
addFinding, addLikeliHood, getAssociatedClique, getEvidence, getMarginalAt, hasEvidence, initMarginalList, IsMarginalList, setAssociatedClique, updateEvidences
 
Methods inherited from class unbbayes.prs.Node
addChild, addChildNode, addExplanationPhrase, addNodeNameChangedListener, addParent, addParentNode, atualizatamanhoinfoestados, clearAdjacents, compareTo, equals, getAdjacentNodes, getAdjacents, getChildNodes, getChildren, getColor, getDefaultHeight, getDefaultSize, getDefaultWidth, getDescription, getDisplayMode, getExplanationDescription, getExplanationPhrase, getHeight, getInformationType, getLabel, getMean, getName, getParentNodes, getParents, getPhrasesMap, getPosition, getSize, getStandardDeviation, getStateAt, getStatesSize, getWidth, hasState, isChildOf, isParentOf, isPointInDrawableArea, isSelected, makeAdjacents, nameChanged, removeChild, removeChildNode, removeNodeNameChangedListener, removeParent, removeParentNode, removeStateAt, setAdjacents, setChildNodes, setChildren, setColor, setDescription, setDisplayMode, setExplanationDescription, setInformationType, setLabel, setMean, setName, setParentNodes, setParents, setPhrasesMap, setPosition, setSelected, setSize, setSizeIsVariable, setSizeVariable, setStandardDeviation, setStateAt, setStates, toString, updateLabel
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProbabilisticNode

public ProbabilisticNode()
Constructs a ProbabilisticNode with an initialized table and an incremented DrawElement.

Method Detail

getType

public int getType()
Description copied from interface: INode
Method to extract node's type. It is free to use any value as any meaning.

Specified by:
getType in interface INode
Returns:

clone

public ProbabilisticNode clone(double raio)
Copia as caracterÔøΩsticas principais para o nÔøΩ desejado

Parameters:
raio - raio do nÔøΩ.
Returns:
cÔøΩpia do nÔøΩ

clone

public Object clone()
Overrides:
clone in class Object

basicClone

public ProbabilisticNode basicClone()

getProbabilityFunction

public PotentialTable getProbabilityFunction()
Returns the probabilistic table of this variable.

Specified by:
getProbabilityFunction in interface IRandomVariable
Returns:
the CPT (potential table)

marginal

protected void marginal()
Calculates the margin of this node.

Specified by:
marginal in class TreeVariable

appendState

public void appendState(String state)
Inserts a new state and updates the affected tables. Overrides Node's superclass method.

Specified by:
appendState in interface INode
Overrides:
appendState in class Node
Parameters:
state - : a new state to be added.

removeAllStates

public void removeAllStates()
Remove all, but one, states by removing the last state until there is just one left.


removeLastState

public void removeLastState()
Removes the newest state and updates the affected tables. Overwrites a Node's superclass method.

Specified by:
removeLastState in interface INode
Overrides:
removeLastState in class Node

getDescriptionColor

public static Color getDescriptionColor()
Returns node's color.

Returns:
color of the probabilistic node.

setDescriptionColor

public static void setDescriptionColor(int c)
Changes the description node's color.

Parameters:
c - RGB value of the new color.

setExplanationColor

public static void setExplanationColor(int c)
Changes the explanation's node's color.

Parameters:
c - RGB value of the new color.

getExplanationColor

public static Color getExplanationColor()
Gets the explanationColor.

Returns:
Returns a Color


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.