ls
Class CPT

java.lang.Object
  |
  +--ls.CPT

public class CPT
extends java.lang.Object

This class represents an individual cpt for a node. It stores the names of the items is the blocks so that they will be easy to use and manipulate when looking for particular cpt values.


Constructor Summary
CPT()
          Creates an empty CPT value.
 
Method Summary
 void addGiven(Node cb)
          Adds a given value to the cpt.
 Node getFor()
          Returns the for part of the cpt.
 Node getGiven(int loc)
          This returns a particular given value in the cpt.
 int numGiven()
          Returns the number of times that this cpt is depends upon.
 void setFor(Node ffor)
          Sets the for part of the CPT
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CPT

public CPT()
Creates an empty CPT value.
Method Detail

setFor

public void setFor(Node ffor)
Sets the for part of the CPT
Parameters:
ffor - the for value in the cpt, the part to left of |

addGiven

public void addGiven(Node cb)
Adds a given value to the cpt. There can be 0 to many givens per cpt. This would be the part to the right of the |
Parameters:
cb - the given value in the cpt

getFor

public Node getFor()
Returns the for part of the cpt. Each cpt values have a for, it is represented in one of two ways, P(for) or P(for | given1, ...)
Returns:
ffor - the for value of the cpt

getGiven

public Node getGiven(int loc)
This returns a particular given value in the cpt.
Parameters:
loc - the location of the given node that is to be returned
Returns:
given - the given value at the specified location

numGiven

public int numGiven()
Returns the number of times that this cpt is depends upon. How many items are after the | in the cpt. It can be 0 to many
Returns:
num - the number of givens