|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tuffy.infer.InferBucket
public class InferBucket
A bucket of inference tasks that can run in prallel. Currently, each task correspond to an MRF component so that the components can be processed in parallel.
Nested Class Summary | |
---|---|
static class |
InferBucket.CompWorker
A worker thread that runs inference on one component at a time. |
Field Summary | |
---|---|
private Bucket |
bucket
|
private double |
cost
|
private int |
numThreads
|
private java.util.ArrayList<Component> |
q
The queue of components to be processed |
private java.lang.Object |
sentinel
|
(package private) Settings |
settings
|
(package private) Config.TUFFY_INFERENCE_TASK |
task
|
Constructor Summary | |
---|---|
InferBucket(Bucket bucket)
|
Method Summary | |
---|---|
void |
addCost(double c)
Add up the cost. |
void |
flushAtomStates(DataMover dmover,
java.lang.String relAtoms)
|
double |
getCost()
Get the cost after inference. |
int |
getNumThreads()
|
Component |
getTask()
Get the next unprocessed component in the queue |
void |
infer(Settings s)
|
private void |
runInferParallel()
Solve the components in parallel. |
void |
setMrfInitStrategy(MRF.INIT_STRATEGY strategy)
|
void |
setNumThreads(int numThreads)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Bucket bucket
private int numThreads
private double cost
Config.TUFFY_INFERENCE_TASK task
Settings settings
private java.lang.Object sentinel
private java.util.ArrayList<Component> q
Constructor Detail |
---|
public InferBucket(Bucket bucket)
Method Detail |
---|
public void infer(Settings s)
public void flushAtomStates(DataMover dmover, java.lang.String relAtoms)
public void setMrfInitStrategy(MRF.INIT_STRATEGY strategy)
public double getCost()
public void addCost(double c)
c
- InferBucket.CompWorker.run()
public Component getTask()
InferBucket.CompWorker.run()
private void runInferParallel()
ntries
- nflips
- public void setNumThreads(int numThreads)
public int getNumThreads()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |