The SUMO toolbox  2018a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | List of all members
ThreadedBasicDataSource Class Referenceabstract

This class simply calls evaluate() in a new thread. More...

Inheritance diagram for ThreadedBasicDataSource:
Inheritance graph
[legend]

Public Member Functions

 ThreadedBasicDataSource (Config config)
 
final void run ()
 Polls the input queue for new samples in a separate thread and calls evaluate. More...
 
void cleanup ()
 Stop the thread and cleanup. More...
 
abstract void evaluate (SamplePoint point)
 Evaluate one point. More...
 
SamplePoint requestNewSample ()
 Request a new sample for evaluation. More...
 
void submitSamplesForEvaluation (SamplePoint[] points)
 Schedule points for evaluation. More...
 
SamplePoint fetchEvaluatedSample ()
 Get the next evaluated point. More...
 
int getNumPendingSamples ()
 Return the number of poitns pending evaluation. More...
 
int getNumEvaluatedSamples ()
 Return the number of evaluated points waiting to be fetched. More...
 
double getAverageEvaluationTime ()
 Return the average evaluation time (in seconds) for one data point. More...
 
DataSourceStatus getStatus ()
 Returns default status. More...
 
int getInputDimension ()
 
int getOutputDimension ()
 

Protected Member Functions

final void submitEvaluatedSample (SamplePoint point)
 This function is called by the derived subclass whenever a successfully evaluated point needs to be added to the queue. More...
 
final void submitFailedSample (SamplePoint point)
 This function is called by the derived subclass whenever a FAILED point needs to be added to the queue. More...
 
AbstractSampleQueueManager getSampleQueueManager ()
 Get the sample queue manager for this sample evaluator. More...
 

Detailed Description

This class simply calls evaluate() in a new thread.

Constructor & Destructor Documentation

ThreadedBasicDataSource ( Config  config)
inline

Member Function Documentation

void cleanup ( )
inline

Stop the thread and cleanup.

Implements DataSource.

abstract void evaluate ( SamplePoint  point)
abstractinherited

Evaluate one point.

SamplePoint fetchEvaluatedSample ( )
inlineinherited

Get the next evaluated point.

Implements DataSource.

double getAverageEvaluationTime ( )
inlineinherited

Return the average evaluation time (in seconds) for one data point.

Implements DataSource.

int getInputDimension ( )
inlineinherited
int getNumEvaluatedSamples ( )
inlineinherited

Return the number of evaluated points waiting to be fetched.

Implements DataSource.

int getNumPendingSamples ( )
inlineinherited

Return the number of poitns pending evaluation.

Implements DataSource.

int getOutputDimension ( )
inlineinherited
AbstractSampleQueueManager getSampleQueueManager ( )
inlineprotectedinherited

Get the sample queue manager for this sample evaluator.

DataSourceStatus getStatus ( )
inlineinherited

Returns default status.

Can be overrided if other than default behaviour is desired.

Implements DataSource.

SamplePoint requestNewSample ( )
inlineinherited

Request a new sample for evaluation.

final void run ( )
inline

Polls the input queue for new samples in a separate thread and calls evaluate.

final void submitEvaluatedSample ( SamplePoint  point)
inlineprotectedinherited

This function is called by the derived subclass whenever a successfully evaluated point needs to be added to the queue.

final void submitFailedSample ( SamplePoint  point)
inlineprotectedinherited

This function is called by the derived subclass whenever a FAILED point needs to be added to the queue.

void submitSamplesForEvaluation ( SamplePoint[]  points)
inlineinherited

Schedule points for evaluation.

Implements DataSource.


The documentation for this class was generated from the following file: