|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.AbstractQuery blog.ArgSpecQuery blog.FormulaQuery
public class FormulaQuery
Field Summary |
---|
Fields inherited from class blog.ArgSpecQuery |
---|
argSpec, histogram, outputFile, outputFiles, variable |
Constructor Summary | |
---|---|
FormulaQuery(Formula formula)
|
Method Summary | |
---|---|
Formula |
formula()
|
Histogram |
getHistogram()
|
void |
logResults(int numSamples)
If a log file has been specified, prints the results so far to that file. |
void |
printResults(java.io.PrintStream s)
Prints the results of this query to the given stream. |
void |
printVarianceResults(java.io.PrintStream s)
Prints across-run statistics. |
void |
setPosterior(ve.Factor posterior)
Throws an UnsupportedOperationException. |
void |
updateStats(PartialWorld world,
double weight)
Updates the within-run statistics for this query to reflect the given world sampled with the given weight. |
void |
zeroOut()
Ends the current run, records across-run statistics for it, and clears the within-run statistics. |
Methods inherited from class blog.ArgSpecQuery |
---|
argSpec, checkTypesAndScope, compile, getLocation, getVariables, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FormulaQuery(Formula formula)
Method Detail |
---|
public Formula formula()
public void printResults(java.io.PrintStream s)
Query
printResults
in interface Query
printResults
in class ArgSpecQuery
public void logResults(int numSamples)
AbstractQuery
This default implementation does nothing.
logResults
in interface Query
logResults
in class ArgSpecQuery
numSamples
- the number of samples taken by the inference
engine so far (can be set to zero for
non-sampling inference engines)public void updateStats(PartialWorld world, double weight)
Query
getVariables
.
The effects of calling both updateStats
and
setPosterior
in the same run are not defined.
updateStats
in interface Query
updateStats
in class ArgSpecQuery
public void setPosterior(ve.Factor posterior)
AbstractQuery
setPosterior
in interface Query
setPosterior
in class ArgSpecQuery
posterior
- factor whose set of variables is the same
as the collection returned by getVariables,
and whose entries sum to 1public void zeroOut()
Query
zeroOut
in interface Query
zeroOut
in class ArgSpecQuery
public void printVarianceResults(java.io.PrintStream s)
Query
printVarianceResults
in interface Query
printVarianceResults
in class ArgSpecQuery
public Histogram getHistogram()
getHistogram
in class ArgSpecQuery
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |