unbbayes.prs.bn
Interface IProbabilityFunction

All Known Implementing Classes:
PotentialTable, ProbabilisticTable, UtilityTable

public interface IProbabilityFunction

This class represents a probability function (e.g. probability table if a variable is a tabled variable) associated with a random variable.

Author:
Shou Matsumoto

Method Summary
 void addVariable(INode variable)
          Inserts a variable into function.
 INode getVariableAt(int index)
          Obtains a variable (node) associated with this function
 void notifyModification()
          This method has to be called when there is a change in any of the variables in this function.
 void removeVariable(INode variable)
          Remove the variable from this function.
 void removeVariable(INode variable, boolean update)
          Remove the variable from this function.
 void setVariableAt(int index, INode node)
          Inserts a variable into position
 int variableCount()
          Obtains the number of associated variables.
 

Method Detail

addVariable

void addVariable(INode variable)
Inserts a variable into function. This is usually called by the program when we insert an edge into a node. The first variable is usually the owner of the table

Parameters:
variable - : variable to be injected.

variableCount

int variableCount()
Obtains the number of associated variables.

Returns:
the quantity of variables inserted into this probability function

getVariableAt

INode getVariableAt(int index)
Obtains a variable (node) associated with this function

Parameters:
index -
Returns:
a node/variable identified by index

removeVariable

void removeVariable(INode variable)
Remove the variable from this function. You should implement general marginalization as well

Parameters:
variable - variable to be removed.

removeVariable

void removeVariable(INode variable,
                    boolean update)
Remove the variable from this function. You should implement general marginalization as well

Parameters:
variable - variable to be removed.
update - this parameter should be set to true/false if an active update to some values of probability function is required (or not).

setVariableAt

void setVariableAt(int index,
                   INode node)
Inserts a variable into position

Parameters:
index - : position to insert variable
node - : variable to be inserted

notifyModification

void notifyModification()
This method has to be called when there is a change in any of the variables in this function.



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