public class OnlineEngineMixed
extends java.lang.Object
The implementation for this class is trivial. Each method invokes a method in the superclass. The purpose of this class is to define which operations are available for the particular compile kind by selectively making operations in the superclass public.
Constructor and Description |
---|
OnlineEngineMixed(java.io.BufferedReader lmReader,
java.io.BufferedReader acReader)
Reads a literal map from the first given reader, reads an AC from the
second given reader, and constructs an online engine linked to the read
literal map and read AC.
|
OnlineEngineMixed(java.lang.String lmFilename,
java.lang.String acFilename)
Reads a literal map from the file having the first given name, reads an AC
from the file having the second given name, and constructs an online engine
linked to the read literal map and read AC.
|
Modifier and Type | Method and Description |
---|---|
void |
evaluate(Evidence e)
Evaluates the circuit under the given evidence.
|
boolean |
evaluateResultsAvailable()
Returns whether evaluation results are available.
|
double |
evaluationResults()
Returns value computed during the most recent evaluation.
|
java.lang.String |
nameForPot(int p)
Returns the name of the given potential.
|
java.lang.String |
nameForVar(int v)
Returns the name of the given variable.
|
int |
numPotentials()
Returns the number of potentials.
|
int |
numVariables()
Returns the number of variables.
|
int |
potForName(java.lang.String n)
Returns the potential having the given name.
|
int |
varForName(java.lang.String n)
Returns the variable having the given name.
|
public OnlineEngineMixed(java.lang.String lmFilename, java.lang.String acFilename) throws java.lang.Exception
acFilename
- the first given name.lmFilename
- the second given name.java.lang.Exception
- if the engine cannot be instantiated.public OnlineEngineMixed(java.io.BufferedReader lmReader, java.io.BufferedReader acReader) throws java.lang.Exception
lmReader
- the first given name.acReader
- the second given name.java.lang.Exception
- if the engine cannot be instantiated.public int numVariables()
public int numPotentials()
public int varForName(java.lang.String n)
n
- the given name.public int potForName(java.lang.String n)
n
- the given name.public java.lang.String nameForVar(int v)
v
- the given variable.public java.lang.String nameForPot(int p)
p
- the given potential.public void evaluate(Evidence e) throws java.lang.Exception
e
- the given evidence.java.lang.Exception
- if the evaluation fails.public boolean evaluateResultsAvailable()
public double evaluationResults() throws java.lang.Exception
java.lang.Exception
- if the evaluation fails.