|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cve.RuleCollection
A rule collection is a collection of generalised rules. This is much like a Vector, however we probably want to add more indexing at some time.
Inner Class Summary | |
private class |
RuleCollection.Itr
|
Field Summary | |
private int |
defaultInitialMaxSize
|
private static int |
maxContextSize
|
private static int |
maxNumRules
|
private int |
maxSize
|
private static int |
maxTableSize
|
private int |
size
|
private GenRule[] |
theRules
|
Constructor Summary | |
(package private) |
RuleCollection()
generate an empty rule collection. |
(package private) |
RuleCollection(int initialSize)
generate an empty rule collection with the given initial size. |
Method Summary | |
void |
add(GenRule newrule)
add a new element to the collection. |
RuleCollection |
combineRemainingRules()
|
private static boolean |
disjoint(Variable[] vs1,
Variable[] vs2)
|
RuleCollection |
eliminate(Variable var)
eliminates the variable from the current collection of rules. |
RuleCollection |
eliminatePretend(Variable var)
pretends to eliminates the variable from the current collection of rules. |
protected static Factor |
factorSet(Factor fac,
Context con)
set the variables in fac to the context con |
int |
getMaxContextSize()
|
int |
getMaxNumRules()
|
int |
getMaxTableSize()
|
int |
getNumRules()
|
int |
getSize()
returns the number of parameters in the rule collection |
RuleIterator |
iterator()
|
RuleCollection |
observe(Variable[] observedVars,
int[] observedVals)
update the factors to make the appropriate observations. |
void |
print()
prints the rule collection. |
void |
printBrief()
prints the summary of the rule collection. |
private static Variable[] |
removeVar(Variable[] vars,
Variable var)
removes variable var from the list of variables vars. |
static void |
resetMaxTableSize()
|
private static RuleCollection |
ruleCollectionSum(RuleCollection c1,
RuleCollection c2)
constructs a new rule collection by adding two other rule collections. |
static Variable[] |
unionVariableArrays(Variable[] a1,
Variable[] a2)
returns the union of the two variable arrays. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private GenRule[] theRules
private int size
private int maxSize
private final int defaultInitialMaxSize
private static int maxTableSize
private static int maxNumRules
private static int maxContextSize
Constructor Detail |
RuleCollection()
RuleCollection(int initialSize)
Method Detail |
public int getMaxTableSize()
public int getMaxNumRules()
public int getMaxContextSize()
public static void resetMaxTableSize()
public int getNumRules()
public void add(GenRule newrule)
public RuleIterator iterator()
public RuleCollection eliminate(Variable var)
public RuleCollection eliminatePretend(Variable var)
public RuleCollection combineRemainingRules()
public RuleCollection observe(Variable[] observedVars, int[] observedVals)
private static Variable[] removeVar(Variable[] vars, Variable var)
private static RuleCollection ruleCollectionSum(RuleCollection c1, RuleCollection c2)
public static Variable[] unionVariableArrays(Variable[] a1, Variable[] a2)
public void print()
public void printBrief()
public int getSize()
protected static Factor factorSet(Factor fac, Context con)
private static boolean disjoint(Variable[] vs1, Variable[] vs2)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |