ls
Class Potential
java.lang.Object
|
+--ls.Potential
- public class Potential
- extends java.lang.Object
This class is responible for storing all of the cpt calculations that
would make up the potential. This is used so that it can be easily
determined of how one would go about calculation phi, based on individual
attributes probabilities.
|
Constructor Summary |
Potential()
Creates a new potential that has no cpt's associated with it. |
|
Method Summary |
void |
add(CPT c)
Adds a new cpt to the list. |
void |
addCB(java.lang.Object c)
Sets one of the nodes that is used in computing the potential. |
Potential |
copy()
|
CPT |
get(int index)
Returns a particular cpt at a given location. |
java.util.Vector |
getCB()
|
Node |
getCB(int index)
Gets one of the nodes that is used in computing the potential. |
void |
setCB(java.util.Vector v)
|
void |
setCPT(java.util.Vector v)
|
int |
size()
Returns the number of cpt's that are contianed within a particluar
potential. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Potential
public Potential()
- Creates a new potential that has no cpt's associated with it.
size
public int size()
- Returns the number of cpt's that are contianed within a particluar
potential. If the size = 0 then the potential value will equal 1.
- Returns:
- size - the number of cpt's that are used to calculate
the potential
get
public CPT get(int index)
- Returns a particular cpt at a given location.
- Parameters:
index - the location of the cpt to be returned- Returns:
- cpt - the cpt that the specified index
add
public void add(CPT c)
- Adds a new cpt to the list. This results in another cpt that the
potential for a clique needs to be mulitplied by to achive the
actual potential.
- Parameters:
c - the cpt to be added
getCB
public Node getCB(int index)
- Gets one of the nodes that is used in computing the potential.
- Returns:
- one of the nodes in the potential
getCB
public java.util.Vector getCB()
addCB
public void addCB(java.lang.Object c)
- Sets one of the nodes that is used in computing the potential.
- Parameters:
cb - one of the nodes in the potential
copy
public Potential copy()
setCB
public void setCB(java.util.Vector v)
setCPT
public void setCPT(java.util.Vector v)