|
|||||||
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_ASSIGN
|
static int |
BY_CPT
some constants so it can remember how it was created. |
static int |
BY_DETERMINISTIC
|
static int |
BY_EXPANDING
|
static int |
BY_GENRULE
|
static int |
BY_MAXIMIZING
|
static int |
BY_MULTIPLYING
|
static int |
BY_NORMALIZING
|
static int |
BY_OBSERVED
|
static int |
BY_PLUS
|
static int |
BY_REORDERING
|
static int |
BY_SAVEIT
|
static int |
BY_SUM_OUT
|
static int |
BY_UNIFORM
|
static int |
BY_UPDATABLE
|
static int |
BY_V_ELIM
|
private int |
howCreatedVal
|
private static boolean |
savingForTracing
|
private int |
thesize
the size of the factor table. |
private Variable[] |
variables
variables is the tuple of variables, in order. |
Constructor Summary | |
Factor(Variable[] vars,
int how)
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. |
boolean |
getSavingForTracing()
returns true if the intermediate Factors are being saved to allow for tracing of how a value was computed. |
Variable[] |
getVariables()
returns the tuple of variables, in order. |
int |
howCreated()
returns the integer representing how it was created |
boolean |
isRedundant(Variable var)
is true if the variable is redundant in the factor. |
boolean |
isRedundant(Variable var,
double threshold)
is true if the variable is redundant in the factor within a threshold. |
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 |
void |
setSavingForTracing(boolean val)
sets the property that the intermediate Factors are being saved to allow for tracing of how a value was computed. |
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 |
|
Field Detail |
public static final int BY_CPT
public static final int BY_V_ELIM
public static final int BY_OBSERVED
public static final int BY_SUM_OUT
public static final int BY_MULTIPLYING
public static final int BY_ASSIGN
public static final int BY_EXPANDING
public static final int BY_MAXIMIZING
public static final int BY_NORMALIZING
public static final int BY_PLUS
public static final int BY_REORDERING
public static final int BY_SAVEIT
public static final int BY_UPDATABLE
public static final int BY_UNIFORM
public static final int BY_GENRULE
public static final int BY_DETERMINISTIC
private int howCreatedVal
private static boolean savingForTracing
private Variable[] variables
private int thesize
Constructor Detail |
public Factor(Variable[] vars, int how)
Method Detail |
public int howCreated()
public boolean getSavingForTracing()
public void setSavingForTracing(boolean val)
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 boolean isRedundant(Variable var, double threshold)
public void display()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |