|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ve.Factor
A factor is a table that given a tuple of values returns a value.
This is an abstract class that can be instantiated in many ways,
for example the FactorTimes
factor that
is the product of other factors.
Field Summary | |
static int |
BY_MULTIPLYING
|
static int |
BY_SUM_OUT
|
static int |
BY_V_ELIM
|
static int |
BY_V_OBS
|
static int |
FROM_NODE
|
int |
howCreated
|
Constructor Summary | |
Factor(Variable[] Vars)
constructs a factor for the variables given. |
Method Summary | |
boolean |
allOnes()
Is true if the factor consists entirely of ones. |
boolean |
contains(Variable v)
returns true if the factor contains variable v. |
void |
display()
displays the resultant factor. |
java.lang.String |
getName()
returns string the variables this is a factor on. |
Variable[] |
getVariables()
returns the tuple of variables, in order. |
boolean |
isRedundant(Variable var)
is true if the variable is redundant in the factor. |
abstract EltsIterator |
iterator()
Returns an iterator over the values of the factor. |
void |
print()
prints the Factor in a table form. |
void |
print(java.lang.String indent)
prints the Factor in a table form, with a string that is printed at the start of each line. |
void |
printVariables()
prints the variables |
int |
size()
returns the size of a factor table. |
java.lang.String |
toString()
returns a string representation of the Factor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int FROM_NODE
public static final int BY_V_ELIM
public static final int BY_V_OBS
public static final int BY_SUM_OUT
public static final int BY_MULTIPLYING
public int howCreated
Constructor Detail |
public Factor(Variable[] Vars)
Method Detail |
public java.lang.String getName()
public Variable[] getVariables()
public abstract EltsIterator iterator()
public int size()
public boolean contains(Variable v)
v
- a variablespublic java.lang.String toString()
toString
in class java.lang.Object
public void printVariables()
public void print()
public void print(java.lang.String indent)
public boolean allOnes()
public boolean isRedundant(Variable var)
public void display()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |