Abstract base class for Likelihood computation.
|
Public Member Functions |
|
virtual | ~LikelihoodComputation () |
| | create virtual destructor for subclasses
|
| virtual double | Likelihood (State &state, int indx) |
| | Determine liklihood for given state.
|
|
| LikelihoodComputation () |
| | Constructor.
|
|
virtual | ~LikelihoodComputation () |
| | create virtual destructor for subclasses
|
|
virtual double | Likelihood (State &, int indx)=0 |
| | Determine liklihood for given state.
|
|
virtual double | LikelihoodPrevious (State &, int indx)=0 |
| | Determine liklihood for previous state.
|
|
virtual void | init (Simulation *_simulation) |
| | Bind the likelihood object to a simulation.
|
|
virtual Simulation * | GetSimulation () |
| | Return a pointer to the Simulation instance.
|
|
virtual Model * | GetModel () |
| | Return a pointer to the Model instance.
|
|
virtual BaseDataTree * | GetBaseDataTree () |
| | Return a pointer to the BaseDataTree instance.
|
|
virtual Integration * | GetIntegration () |
| | Return a pointer to the Integration instance.
|
|
virtual LikelihoodFunction * | GetLikeProb () |
| | Return a pointer to the LikelihoodFunction instance.
|
|
virtual void | normEvaluateList (Model *model, Tile *tile, const vector< double > &x, const vector< double > &y, SampleDistribution *sampleDistribution, vector< double > &evaluations)=0 |
| | Evaluate the model norm at a list of points.
|
|
virtual void | modelEvaluateList (Model *model, Tile *tile, const vector< double > &x, const vector< double > &y, SampleDistribution *sampleDistribution, vector< vector< double > > &evaluations)=0 |
| | Evaluate the model value at a list of points.
|
|
virtual void | Granularity (int mpi_type) |
| | Deprecated. Specify the kind of parallelism.
|
| void | TileCompare () |
| | Print out 2-d images of theory, data, and comparison.
|
| void | SetTessTool (TessToolSender *ttsender) |
| | Attach TessToolSender.
|
|
void | SampleNext () |
| | Called by TessTool to generate a new sample of simulation values.
|
|
void | SampleNext (int sessionid) |
| | Called by TessTool to generate a new sample of simulation values with sessionId checking.
|
|
void | SwitchOnCLI () |
| | Return control to the CLI.
|
|
void | SuspendSimulation () |
| | Request that the simulation suspend itself.
|
|
void | ResumeSimulation () |
| | Request that the simulation be restarted.
|
|
Semaphore * | getLikelihoodSem () |
| | Get the semaphore instance controlling the likelihood computation.
|
|
void | setLikelihoodSem (Semaphore *s) |
| | Set the semaphore instance controlling the likelihood computation.
|
|
void | setCLISem (Semaphore *s) |
| | Set the semaphore instance controlling the CLI.
|
|
void | TessToolSynchronize () |
| | synchronize with TessTool
|
|
virtual void | InitializeTessToolTileDump () |
| | Request a TessTool data dump.
|
|
virtual void | TessToolTileDump (Tile *t, SampleDistribution *sd, vector< double > &z) |
| | The member function that performs the dump.
|
|
virtual void | FinalizeTessToolTileDump () |
| | Handshake closing up the TessTool Tile dump.
|
|
virtual int | getNumAndIdsOfTileMasters (int *num, int **idlist) |
| | For internal use: return the number nodes controlling tile computation.
|
|
virtual void | BuildTessToolTileDumpBaseStream () |
| | Request that the.
|
|
virtual RecordOutputStream * | GetTessToolTileDumpBaseStream () |
| | Get a pointer to the stream.
|
|
virtual void | SetTessToolTileDumpBaseStream (RecordOutputStream *bstrm) |
| | Set the TessTool RecordOutputStream.
|
|
virtual RecordOutputStream * | AttachMPIFilterToTessTool (RecordOutputStream *rostrm) |
| | The final stream(after attaching required filters) is used to construct MPIFilter.
|
|
virtual void | UpdateTessTool (RecordType *rt, RecordOutputStream *rostrm, MPIStreamFilter *mpifilter) |
| | The final record type, record output stream and the mpifilter are saved in tesstool.
|
|
virtual void | TessToolTileDumpToBaseStream (Tile *t, SampleDistribution *sd, vector< double > &z) |
| | Call for the data dump.
|
|
virtual bool | Serial ()=0 |
| | Request serial or parallel evaluation For captive thread likelihood computation, parent thread should not be computing the prior probability.
|
|
| void | startThread () |
| | Threading routines.
|
|
void | stopThread () |
| | Stop and join the enslaved worker thread.
|
| virtual void | enslave_worker (void *arg) |
| | Initialize the set of processors for subsequent likelihood calls.
|
|
virtual void | free_workers () |
| | Release the processors locked by enslave_workers.
|
Protected Member Functions |
|
void | thread_fork (int command) |
| | Make some threads.
|
|
void | TileDump (Tile *t, SampleDistribution *sd, vector< double > &z) |
| | Per tile output diagnostic "image".
|
|
void | SwitchedOnCLI () |
| | Handler for TessTool inside LikelihoodComputation to prevent deadlocks.
|
| void | ResumedSimulation () |
| | Called by the cli thread.
|
| void | SuspendedSimulation () |
| | Make the cli thread active.
|
|
void | DetachTessTool () |
| | Request that the TessTool detach from the simulation.
|
|
int | encode_command (int) |
| | Likelihood handling command packing for sending.
|
|
int | decode_command (int) |
| | Likelihood handling command unpacking for handling request.
|
|
void | setPriorFrontier () |
| | Set the BaseDataTree frontier to the one at the previous level.
|
|
void | setCurrentFrontier () |
| | Set the BaseDataTree frontier to the one at the current level.
|
|
void | StateToBuffer (State &, double *, unsigned int size) |
| | Take a state, pack into a buffer.
|
|
void | BufferToState (State &, double *, unsigned int size) |
| | Unpack a buffer into a state.
|
|
virtual bool | Slaves () |
| | Likelihood computation may be enslaved.
|
Protected Attributes |
|
thrd_pass_LikeComp | td |
| | Threading stuff.
|
|
pthread_t * | t |
| | Thread pointer.
|
|
bool | threading_on |
| | Threading state.
|
|
int | parent_id |
| | MPI node id for thread.
|
|
Semaphore | likelihoodMutex |
| | Semaphore for sycrhonizing Mutex.
|
|
bool | DEBUG_LIKE |
| | Turn on tile bin/point diagnostics (default: false).
|
|
TessToolSender * | tesstool |
| | The TessTool communicator.
|
|
RecordOutputStream * | rostrm |
| | Pointer to the TessTool output stream.
|
|
int | _sessionId |
| | The session id for this stream.
|
|
int | _nextSessionId |
| | The next session id.
|
|
Frontier * | fd_temp |
| | Temporary frontier pointer.
|
|
| int | requestSynchronization |
| | Flags used to handle TessTool requests.
|
|
int | sampleNext |
| | 1 if new sample is requested
|
|
int | switchCliOn |
| | 1 if CLI switch is requested
|
|
int | suspendSimulation |
| | 1 if suspend is requested
|
|
int | resumeSimulation |
| | 1 if resume is requested
|
|
int | detachTessTool |
| | 1 if detach is requested
|
|
bool | _builtTTBaseStream |
| | True if the TessTool output stream has been constructed.
|
Friends |
|
class | boost::serialization::access |
Abstract base class for Likelihood computation.
Compute the likelihood for the model given the data.
This class also supplies a default serial implementation.