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

This is class is an partial implementation of the interface DataSource. More...

Inheritance diagram for BasicDataSource:
Inheritance graph
[legend]

Public Member Functions

 BasicDataSource (Config config)
 
abstract void evaluate (SamplePoint point)
 Evaluate one point. More...
 
SamplePoint requestNewSample ()
 Request a new sample for evaluation. More...
 
void cleanup ()
 Clean up the threads started and the resources used by the sample evaluator. 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 is class is an partial implementation of the interface DataSource.

Constructor & Destructor Documentation

BasicDataSource ( Config  config)
inline

Member Function Documentation

void cleanup ( )
inline

Clean up the threads started and the resources used by the sample evaluator.

Called automatically when the DataSource is not to be used anymore.

Implements DataSource.

abstract void evaluate ( SamplePoint  point)
abstract

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 ( )
inline

Request a new sample for evaluation.

final void submitEvaluatedSample ( SamplePoint  point)
inlineprotected

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

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: