Dakota
Version
Explore and Predict with Confidence
|
Results manager for iterator final data. More...
Public Member Functions | |
ResultsManager () | |
default constructor: no databases active until they are added | |
void | clear_databases () |
Delete all databases. | |
void | add_database (std::unique_ptr< ResultsDBBase >) |
Add a database. | |
bool | active () const |
whether any databases are active | |
void | flush () const |
Flush data to the database or disk, if supported. | |
void | close () |
Close the database, if supported. This removes it from the active list of databases. | |
template<typename StoredType > | |
void | insert (const StrStrSizet &iterator_id, const StringArray &location, const StoredType &sent_data, const DimScaleMap &scales=DimScaleMap(), const AttributeArray &attrs=AttributeArray(), const bool &transpose=false) const |
Insert using dimension scales and attributes (DimScaleMap and AttributeArray in dakota_results_types.hpp) | |
void | allocate_matrix (const StrStrSizet &iterator_id, const StringArray &location, ResultsOutputType stored_type, const int &num_rows, const int &num_cols, const DimScaleMap &scales=DimScaleMap(), const AttributeArray &attrs=AttributeArray()) |
Pre-allocate a matrix and (optionally) attach dimension scales and attributes. Insert rows or columns using insert_into(...) | |
void | allocate_vector (const StrStrSizet &iterator_id, const StringArray &location, ResultsOutputType stored_type, const int &len, const DimScaleMap &scales=DimScaleMap(), const AttributeArray &attrs=AttributeArray()) |
Pre-allocate a vector and (optionally) attach dimension scales and attributes. Insert elements insert_into(...) | |
template<typename StoredType > | |
void | insert_into (const StrStrSizet &iterator_id, const StringArray &location, const StoredType &data, const int &index, const bool &row=true) const |
Insert a row or column into a matrix that was pre-allocated using allocate_matrix. | |
void | add_metadata_to_method (const StrStrSizet &iterator_id, const AttributeArray &attrs) |
Associate key:value metadata with all the results and executions of a method. | |
void | add_metadata_to_execution (const StrStrSizet &iterator_id, const AttributeArray &attrs) |
Associate key:value metadata with all the results for this execution of a method. | |
void | add_metadata_to_object (const StrStrSizet &iterator_id, const StringArray &location, const AttributeArray &attrs) |
Associate key:value metadata with the object at the location. | |
void | add_metadata_to_study (const AttributeArray &attrs) |
Associate key:value metadata with the object at the location. | |
template<typename StoredType > | |
void | array_allocate (const StrStrSizet &iterator_id, const std::string &data_name, size_t array_size, const MetaDataType metadata=MetaDataType()) |
allocate an entry with array of StoredType of array_size for future insertion; likely move to non-templated accessors for these | |
template<typename StoredType > | |
void | array_insert (const StrStrSizet &iterator_id, const std::string &data_name, size_t index, const StoredType &sent_data) |
insert into a previously allocated array of StoredType at index specified; metadata must be specified at allocation | |
template<typename StoredType > | |
void | array_insert (const StrStrSizet &iterator_id, const std::string &data_name, size_t index, StringMultiArrayConstView sent_data) |
specialization: insert a SMACV into a previously allocated array of StringArrayStoredType at index specified; metadata must be specified at allocation | |
template<typename StoredType > | |
void | insert (const StrStrSizet &iterator_id, const std::string &data_name, const StoredType &sent_data, const MetaDataType metadata=MetaDataType()) |
insert data | |
void | insert (const StrStrSizet &iterator_id, const std::string &data_name, StringMultiArrayConstView sma_labels, const MetaDataType metadata=MetaDataType()) |
Public Attributes | |
ResultsNames | results_names |
Copy of valid results names for when manager is passed around. | |
Private Member Functions | |
ResultsManager (const ResultsManager &) | |
Private Attributes | |
std::vector< std::unique_ptr< ResultsDBBase > > | resultsDBs |
Friends | |
template<typename StoredType > | |
class | ResultsEntry |
ResultsEntry is a friend of ResultsManager. | |
Results manager for iterator final data.
The results manager provides the API for posting and retrieving iterator results data (and eventually run config/statistics). It can manage a set of underlying results databases, in or out of core, depending on configuration
The key for a results entry is documented in results_types.hpp, e.g., tuple<std::string, std::string, size_t, std::string>
For now, using concrete types for most insertion, since underlying databases like HDF5 might need concrete types; though template parameter for array allocation and retrieval.
All insertions overwrite any previous data.