tuffy.infer
Class InferBucket

java.lang.Object
  extended by tuffy.infer.InferBucket

public class InferBucket
extends java.lang.Object

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.
 
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)
           
 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
 

Constructor Detail

InferBucket

public InferBucket(Bucket bucket)
Method Detail

addCost

public void addCost(double c)
Add up the cost.

Parameters:
c -
See Also:
InferBucket.CompWorker.run()

flushAtomStates

public void flushAtomStates(DataMover dmover,
                            java.lang.String relAtoms)

getCost

public double getCost()
Get the cost after inference.


getNumThreads

public int getNumThreads()

getTask

public Component getTask()
Get the next unprocessed component in the queue

See Also:
InferBucket.CompWorker.run()

infer

public void infer(Settings s)

setMrfInitStrategy

public void setMrfInitStrategy(MRF.INIT_STRATEGY strategy)

setNumThreads

public void setNumThreads(int numThreads)