|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRBNpackage.ProbForm
RBNpackage.ProbFormCombFunc
public class ProbFormCombFunc
Field Summary | |
---|---|
CConstr |
cconstr
|
static int |
ESUM
|
static int |
INVSUM
|
static int |
MEAN
|
CombFunc |
mycomb
|
int |
mycombInt
|
static int |
NOR
|
ProbForm[] |
pfargs
|
java.lang.String[] |
quantvars
|
Fields inherited from class RBNpackage.ProbForm |
---|
RSymbs, SSymbs |
Constructor Summary | |
---|---|
ProbFormCombFunc()
|
|
ProbFormCombFunc(CombFunc mc,
ProbForm[] pfa,
java.lang.String[] qvars,
CConstr cc)
Creates new ProbFormCombFunc |
|
ProbFormCombFunc(java.lang.String mc,
ProbForm[] pfa,
java.lang.String[] qvars,
CConstr cc)
|
Method Summary | |
---|---|
java.lang.String |
asString()
|
java.lang.String |
asString(int depth)
|
java.lang.String |
asString(int depth,
RelStruc A)
|
java.lang.String |
asString(RelStruc A)
|
ProbForm |
conditionEvidence(Instantiation inst)
|
ProbForm |
conditionEvidence(RelStruc A,
Instantiation inst)
Simplify ProbForm by substituting values of instantiated R-atoms and evaluating subformulas no longer dependent on any uninstantiated R-atom. |
boolean |
dependsOn(java.lang.String variable,
RelStruc A,
Instantiation data)
Checks whether this prob.form depends on the unknown parameter 'variable' when prob.form is evaluated over input structure A and relative to instantiation (data) data. |
double |
evalSample(RelStruc A,
java.util.Hashtable atomhasht,
Instantiation inst,
long[] timers)
Evaluate this probform over RelStruc A. |
double |
evaluate(RelStruc A,
Instantiation inst,
java.lang.String[] vars,
int[] tuple,
boolean useCurrentCvals)
Evaluate this ProbForm for input structure A, instantiation inst, under the substitution tuple for vars. |
int |
evaluatesTo(RelStruc A)
|
int |
evaluatesTo(RelStruc A,
Instantiation inst,
boolean usesampleinst,
java.util.Hashtable atomhasht)
Returns 0 if this probform evaluates to zero over structure A and with respect to instantiation inst, but irrespective of any instantiation of other probabilistic atoms. |
java.lang.String[] |
freevars()
returns the free variables of the formula |
java.util.Vector |
makeParentVec(RelStruc A)
returns the vector of (ground!) Atoms on which the evaluation of the probform depends |
java.util.Vector |
makeParentVec(RelStruc A,
Instantiation inst)
same as previous but with respect to the given truth values in the Instantiation argument |
boolean |
multlinOnly()
returns true if ProbForm only contains multilinear combination functions |
int |
myCombInt()
Returns the combination function used in this probform according to the integer encoding: N-or = 1 (= static int ProbFormCombFunc.NOR); Mean = 2 (= static int ProbFormCombFunc.MEAN); InvSum = 3 (= static int ProbFormCombFunc.INVSUM); ESUM = 3 (= static int ProbFormCombFunc.INVSUM); |
int |
numPFargs()
Returns the number of probability formulas in the argument of this formula's combination function |
java.lang.String[] |
parameters()
Returns all the parameters that this ProbForm depends on |
ProbForm |
probformAt(int i)
Returns the i'th probability formula in the argument of this formula's combination function |
java.lang.String[] |
quantvars()
Returns the quantvars of this combination function |
void |
setParameters(java.lang.String[] params,
double[] values)
Sets all occurrences of parameters appearing in params to their corresponding value in values. |
ProbForm |
sEval(RelStruc A)
Returns a ProbForm in which the dependence on A is already pre-evaluated (substitution lists in combination functions, and values of ProbFormSFormula) |
ProbForm |
substitute(java.lang.String[] vars,
int[] args)
returns the formula obtained by substituting args for the vars in the formula. |
ProbForm |
substitute(java.lang.String[] vars,
java.lang.String[] args)
|
int[][] |
tuplesSatisfyingCConstr(RelStruc A,
java.lang.String[] vars,
int[] tuple)
Returns the set of all tuples in A that satisfy the CConstr of this formula after the substituion vars/tuple has been performed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public CombFunc mycomb
public ProbForm[] pfargs
public java.lang.String[] quantvars
public CConstr cconstr
public int mycombInt
public static final int NOR
public static final int MEAN
public static final int INVSUM
public static final int ESUM
Constructor Detail |
---|
public ProbFormCombFunc()
public ProbFormCombFunc(CombFunc mc, ProbForm[] pfa, java.lang.String[] qvars, CConstr cc) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public ProbFormCombFunc(java.lang.String mc, ProbForm[] pfa, java.lang.String[] qvars, CConstr cc) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
Method Detail |
---|
public java.lang.String[] freevars()
ProbForm
freevars
in class ProbForm
public boolean multlinOnly()
ProbForm
multlinOnly
in class ProbForm
public ProbForm substitute(java.lang.String[] vars, int[] args)
ProbForm
substitute
in class ProbForm
public ProbForm substitute(java.lang.String[] vars, java.lang.String[] args)
substitute
in class ProbForm
public java.util.Vector makeParentVec(RelStruc A) throws RBNCompatibilityException
ProbForm
makeParentVec
in class ProbForm
RBNCompatibilityException
public java.util.Vector makeParentVec(RelStruc A, Instantiation inst) throws RBNCompatibilityException
ProbForm
makeParentVec
in class ProbForm
RBNCompatibilityException
public ProbForm conditionEvidence(Instantiation inst)
conditionEvidence
in class ProbForm
public ProbForm conditionEvidence(RelStruc A, Instantiation inst) throws RBNCompatibilityException
ProbForm
conditionEvidence
in class ProbForm
RBNCompatibilityException
public boolean dependsOn(java.lang.String variable, RelStruc A, Instantiation data) throws RBNCompatibilityException
ProbForm
dependsOn
in class ProbForm
RBNCompatibilityException
public double evaluate(RelStruc A, Instantiation inst, java.lang.String[] vars, int[] tuple, boolean useCurrentCvals) throws RBNCompatibilityException
ProbForm
evaluate
in class ProbForm
RBNCompatibilityException
public double evalSample(RelStruc A, java.util.Hashtable atomhasht, Instantiation inst, long[] timers) throws RBNCompatibilityException
ProbForm
evalSample
in class ProbForm
RBNCompatibilityException
public int evaluatesTo(RelStruc A, Instantiation inst, boolean usesampleinst, java.util.Hashtable atomhasht) throws RBNCompatibilityException
ProbForm
evaluatesTo
in class ProbForm
RBNCompatibilityException
public int evaluatesTo(RelStruc A) throws RBNCompatibilityException
evaluatesTo
in class ProbForm
RBNCompatibilityException
public java.lang.String[] parameters()
ProbForm
parameters
in class ProbForm
public java.lang.String asString(int depth)
asString
in class ProbForm
public java.lang.String asString()
asString
in class ProbForm
public java.lang.String asString(int depth, RelStruc A)
asString
in class ProbForm
public java.lang.String asString(RelStruc A)
asString
in class ProbForm
public int myCombInt()
public int numPFargs()
public ProbForm probformAt(int i)
public java.lang.String[] quantvars()
public ProbForm sEval(RelStruc A) throws RBNCompatibilityException
ProbForm
sEval
in class ProbForm
RBNCompatibilityException
public int[][] tuplesSatisfyingCConstr(RelStruc A, java.lang.String[] vars, int[] tuple) throws RBNCompatibilityException
RBNCompatibilityException
public void setParameters(java.lang.String[] params, double[] values)
ProbForm
setParameters
in class ProbForm
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |