Dakota
Version 6.19
Explore and Predict with Confidence
|
Container class for a variables object, a response object, and an evaluation id. More...
Public Member Functions | |
ParamResponsePair () | |
default constructor | |
ParamResponsePair (const Variables &vars, const String &interface_id, const Response &response, bool deep_copy=false) | |
alternate constructor for temporaries More... | |
ParamResponsePair (const Variables &vars, const String &interface_id, const Response &response, const int eval_id, bool deep_copy=true) | |
standard constructor for history uses More... | |
ParamResponsePair (const ParamResponsePair &pair) | |
copy constructor | |
~ParamResponsePair () | |
destructor | |
ParamResponsePair & | operator= (const ParamResponsePair &pair) |
assignment operator | |
void | read (std::istream &s) |
read a ParamResponsePair object from an std::istream | |
void | write (std::ostream &s) const |
write a ParamResponsePair object to an std::ostream | |
void | read_annotated (std::istream &s) |
read a ParamResponsePair object in annotated format from an std::istream | |
void | write_annotated (std::ostream &s) const |
write a ParamResponsePair object in annotated format to an std::ostream | |
void | write_tabular (std::ostream &s, unsigned short tabular_format) const |
write a ParamResponsePair object in tabular format (all variables active/inactive) to an std::ostream | |
void | write_tabular_labels (std::ostream &s, unsigned short tabular_format) const |
write PRP labels in tabular format to an std::ostream | |
void | read (MPIUnpackBuffer &s) |
read a ParamResponsePair object from a packed MPI buffer More... | |
void | write (MPIPackBuffer &s) const |
write a ParamResponsePair object to a packed MPI buffer More... | |
int | eval_id () const |
return the evaluation identifier | |
void | eval_id (int id) |
set the evaluation identifier | |
const String & | interface_id () const |
return the interface identifier from evalInterfaceIds | |
void | interface_id (const String &id) |
set the interface identifier within evalInterfaceIds | |
const IntStringPair & | eval_interface_ids () const |
return the aggregate eval/interface identifier from the response object | |
const Variables & | variables () const |
return the parameters object | |
Variables & | variables () |
return the parameters object | |
void | variables (const Variables &vars) |
set the parameters object | |
const Response & | response () const |
return the response object | |
Response & | response () |
return the response object | |
void | response (const Response &resp) |
set the response object | |
IntResponsePair | response_pair () const |
return evaluation id and response as a std::pair | |
const ActiveSet & | active_set () const |
return the active set object from the response object | |
void | active_set (const ActiveSet &set) |
set the active set object within the response object | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
serialize the PRP: write and read are symmetric for this class | |
Private Attributes | |
Variables | prpVariables |
the set of parameters for the function evaluation | |
Response | prpResponse |
the response set for the function evaluation | |
IntStringPair | evalInterfaceIds |
the evalInterfaceIds aggregate More... | |
Friends | |
class | boost::serialization::access |
allow boost access to serialize this class | |
bool | operator== (const ParamResponsePair &pair1, const ParamResponsePair &pair2) |
equality operator | |
bool | operator!= (const ParamResponsePair &pair1, const ParamResponsePair &pair2) |
inequality operator | |
Container class for a variables object, a response object, and an evaluation id.
ParamResponsePair provides a container class for association of the input for a particular function evaluation (a variables object) with the output from this function evaluation (a response object), along with an evaluation identifier. This container defines the basic unit used in the data_pairs cache, in restart file operations, and in a variety of scheduling algorithm queues. With the advent of STL, replacement of arrays of this class with map<> and pair<> template constructs may be possible (using map<pair<int,String>, pair<Variables,Response> >, for example), assuming that deep copies, I/O, alternate constructors, etc., can be adequately addressed. Boost tuple<> may also be a candidate.
|
inline |
alternate constructor for temporaries
Uses of this constructor often employ the standard Variables and Response copy constructors to share representations since this constructor is commonly used for search_pairs (which are local instantiations that go out of scope prior to any changes to values; i.e., they are not used for history).
|
inline |
standard constructor for history uses
Uses of this constructor often do not share representations since deep copies are used when history mechanisms (e.g., data_pairs and beforeSynchCorePRPQueue) are involved.
|
inline |
read a ParamResponsePair object from a packed MPI buffer
interfaceId is omitted since master processor retains interface ids and communicates asv and response data only with slaves.
References ParamResponsePair::evalInterfaceIds, ParamResponsePair::prpResponse, and ParamResponsePair::prpVariables.
|
inline |
write a ParamResponsePair object to a packed MPI buffer
interfaceId is omitted since master processor retains interface ids and communicates asv and response data only with slaves.
References ParamResponsePair::evalInterfaceIds, ParamResponsePair::prpResponse, and ParamResponsePair::prpVariables.
|
private |
the evalInterfaceIds aggregate
the function evaluation identifier (assigned from Interface::evalIdCntr) is paired with the interface used to generate the response object. Used in PRPCache id_vars_set_compare to prevent duplicate detection on results from different interfaces. evalInterfaceIds belongs here rather than in Response since some Response objects involve consolidation of several fn evals (e.g., Model::synchronize_derivatives()) that are not, in total, generated by a single interface. The prPair, on the other hand, is used for storage of all low level fn evals that get evaluated in ApplicationInterface::map().
Referenced by ParamResponsePair::eval_id(), ParamResponsePair::eval_interface_ids(), ParamResponsePair::interface_id(), ParamResponsePair::operator=(), Dakota::operator==(), ParamResponsePair::read(), ParamResponsePair::response_pair(), and ParamResponsePair::write().