TBTK
TBTK::DataManager Class Reference
Inheritance diagram for TBTK::DataManager:
TBTK::Serializable

Public Types

enum  FileType { Custom, SerializableJSON, PNG }
 
- Public Types inherited from TBTK::Serializable
enum  Mode { Debug, Binary, XML, JSON }
 

Public Member Functions

 DataManager (const std::vector< double > &lowerBounds, const std::vector< double > &upperBounds, const std::vector< unsigned int > &numTicks, const std::vector< std::string > &parameterNames, const std::string &dataManagerName="")
 
 DataManager (const DataManager &dataManager)=delete
 
 DataManager (const std::string &serialization, Mode mode)
 
virtual ~DataManager ()
 
DataManageroperator= (const DataManager &dataManager)=delete
 
double getLowerBound (unsigned int parameterIndex) const
 
double getUpperBound (unsigned int parameterIndex) const
 
unsigned int getNumTicks (unsigned int parameterIndex) const
 
unsigned int getNumParameters () const
 
const std::string & getParameterName (unsigned int parameterIndex) const
 
void setPath (const std::string &path="")
 
const std::string & getPath () const
 
void addDataType (const std::string &dataType, FileType fileType)
 
unsigned int getNumDataTypes () const
 
const std::string & getDataType (unsigned int dataTypeIndex) const
 
FileType getFileType (const std::string &dataType) const
 
int reserveDataPoint (const std::string &dataTypes="")
 
std::vector< double > getParameters (int id) const
 
unsigned int getID (const std::vector< unsigned int > &dataPoint) const
 
std::vector< unsigned int > getDataPoint (unsigned int id) const
 
std::string getFilename (const std::string &dataType, int id) const
 
void markCompleted (const std::string &dataType, int id)
 
void complete (const Serializable &serializable, const std::string &dataType, int id)
 
virtual std::string serialize (Mode mode) const
 

Additional Inherited Members

- Static Public Member Functions inherited from TBTK::Serializable
static bool hasID (const std::string &serialization, Mode mode)
 
static std::string getID (const std::string &serialization, Mode mode)
 
- Static Protected Member Functions inherited from TBTK::Serializable
static bool validate (const std::string &serialization, const std::string &id, Mode mode)
 
static std::string getContent (const std::string &serialization, Mode mode)
 
static std::vector< std::string > split (const std::string &content, Mode mode)
 
static std::string serialize (bool b, Mode mode)
 
static void deserialize (const std::string &serialization, bool *b, Mode mode)
 
static std::string serialize (int i, Mode mode)
 
static void deserialize (const std::string &serialization, int *i, Mode mode)
 
static std::string serialize (unsigned int u, Mode mode)
 
static void deserialize (const std::string &serialization, unsigned int *u, Mode mode)
 
static std::string serialize (double d, Mode mode)
 
static void deserialize (const std::string &serialization, double *d, Mode mode)
 
static std::string serialize (std::complex< double > c, Mode mode)
 
static void deserialize (const std::string &serialization, std::complex< double > *c, Mode mode)
 
static std::string serialize (Statistics s, Mode mode)
 
static void deserialize (const std::string &serialization, Statistics *s, Mode mode)
 
static std::string extract (const std::string &serialization, Mode mode, std::string component)
 

Constructor & Destructor Documentation

TBTK::DataManager::DataManager ( const std::vector< double > &  lowerBounds,
const std::vector< double > &  upperBounds,
const std::vector< unsigned int > &  numTicks,
const std::vector< std::string > &  parameterNames,
const std::string &  dataManagerName = "" 
)

Constructor.

TBTK::DataManager::DataManager ( const DataManager dataManager)
delete

Copy constructor.

TBTK::DataManager::DataManager ( const std::string &  serialization,
Mode  mode 
)

Constructor. Constructs the DataManager from a serialization string.

virtual TBTK::DataManager::~DataManager ( )
virtual

Destructor.

Member Function Documentation

void TBTK::DataManager::addDataType ( const std::string &  dataType,
FileType  fileType 
)

Add a data type to manage.

void TBTK::DataManager::complete ( const Serializable serializable,
const std::string &  dataType,
int  id 
)

Complete save a Serializable result and mark it as completed.

std::vector<unsigned int> TBTK::DataManager::getDataPoint ( unsigned int  id) const

Convert ID to data point.

const std::string & TBTK::DataManager::getDataType ( unsigned int  dataTypeIndex) const
inline

Get data type.

std::string TBTK::DataManager::getFilename ( const std::string &  dataType,
int  id 
) const

Get a (for this DataManager) unique filename that can be used to store and retreive a result.

DataManager::FileType TBTK::DataManager::getFileType ( const std::string &  dataType) const
inline

Get file type.

unsigned int TBTK::DataManager::getID ( const std::vector< unsigned int > &  dataPoint) const

Convert a data point to an ID.

double TBTK::DataManager::getLowerBound ( unsigned int  parameterIndex) const
inline

Get lower bound.

unsigned int TBTK::DataManager::getNumDataTypes ( ) const
inline

Get number of data types.

unsigned int TBTK::DataManager::getNumParameters ( ) const
inline

Get number of parameters.

unsigned int TBTK::DataManager::getNumTicks ( unsigned int  parameterIndex) const
inline

Get number of ticks.

const std::string & TBTK::DataManager::getParameterName ( unsigned int  parameterIndex) const
inline

Get parameter name.

std::vector<double> TBTK::DataManager::getParameters ( int  id) const

Get parameter for a given ID.

const std::string & TBTK::DataManager::getPath ( ) const
inline

Get output path.

double TBTK::DataManager::getUpperBound ( unsigned int  parameterIndex) const
inline

Get upper bound.

void TBTK::DataManager::markCompleted ( const std::string &  dataType,
int  id 
)

Mark data point completed.

DataManager& TBTK::DataManager::operator= ( const DataManager dataManager)
delete

Assignment operator.

int TBTK::DataManager::reserveDataPoint ( const std::string &  dataTypes = "")

Reserve a data point.

virtual std::string TBTK::DataManager::serialize ( Mode  mode) const
virtual
void TBTK::DataManager::setPath ( const std::string &  path = "")

Set output path.


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