Public Member Functions | |
| Response () | |
| default constructor | |
| Response (const Variables &vars, const ProblemDescDB &problem_db) | |
| standard constructor built from problem description database | |
| Response (const ActiveSet &set) | |
| alternate constructor using limited data | |
| Response (const Response &response) | |
| copy constructor | |
| ~Response () | |
| destructor | |
| Response | operator= (const Response &response) |
| assignment operator | |
| size_t | num_functions () const |
| return the number of response functions | |
| const ActiveSet & | active_set () const |
| return the active set | |
| void | active_set (const ActiveSet &set) |
| set the active set | |
| const ShortArray & | active_set_request_vector () const |
| return the active set request vector | |
| void | active_set_request_vector (const ShortArray &asrv) |
| set the active set request vector | |
| const UIntArray & | active_set_derivative_vector () const |
| return the active set derivative vector | |
| void | active_set_derivative_vector (const UIntArray &asdv) |
| set the active set derivative vector | |
| const String & | responses_id () const |
| return the response identifier | |
| const String & | function_label (const size_t &i) const |
| return a response function identifier string | |
| const StringArray & | function_labels () const |
| return the response function identifier strings | |
| void | function_label (const String &label, const size_t &i) |
| set a response function identifier string | |
| void | function_labels (const StringArray &labels) |
| set the response function identifier strings | |
| const Real & | function_value (const size_t &i) const |
| return a function value | |
| const RealVector & | function_values () const |
| return all function values | |
| void | function_value (const Real &function_val, const size_t &i) |
| set a function value | |
| void | function_values (const RealVector &function_vals) |
| set all function values | |
| const RealBaseVector & | function_gradient (const size_t &i) const |
| return a function gradient | |
| const RealMatrix & | function_gradients () const |
| return all function gradients | |
| void | function_gradient (const RealBaseVector &function_grad, const size_t &i) |
| set a function gradient | |
| void | function_gradients (const RealMatrix &function_grads) |
| set all function gradients | |
| const RealMatrix & | function_hessian (const size_t &i) const |
| return a function Hessian | |
| const RealMatrixArray & | function_hessians () const |
| return all function Hessians | |
| void | function_hessian (const RealMatrix &function_hessian, const size_t &i) |
| set a function Hessian | |
| void | function_hessians (const RealMatrixArray &function_hessians) |
| set all function Hessians | |
| void | read (istream &s) |
| read a response object from an istream | |
| void | write (ostream &s) const |
| write a response object to an ostream | |
| void | read_annotated (istream &s) |
| read a response object in annotated format from an istream | |
| void | write_annotated (ostream &s) const |
| write a response object in annotated format to an ostream | |
| void | read_tabular (istream &s) |
| read responseRep::functionValues in tabular format from an istream | |
| void | write_tabular (ostream &s) const |
| write responseRep::functionValues in tabular format to an ostream | |
| void | read (BiStream &s) |
| read a response object from the binary restart stream | |
| void | write (BoStream &s) const |
| write a response object to the binary restart stream | |
| void | read (MPIUnpackBuffer &s) |
| read a response object from a packed MPI buffer | |
| void | write (MPIPackBuffer &s) const |
| write a response object to a packed MPI buffer | |
| Response | copy () const |
| a deep copy for use in history mechanisms | |
| int | data_size () |
| handle class forward to corresponding body class member function | |
| void | read_data (double *response_data) |
| handle class forward to corresponding body class member function | |
| void | write_data (double *response_data) |
| handle class forward to corresponding body class member function | |
| void | overlay (const Response &response) |
| handle class forward to corresponding body class member function | |
| void | copy_results (const Response &response) |
| different derivative array sizing between the two response objects. | |
| void | copy_results (const RealVector &source_fn_vals, const RealMatrix &source_fn_grads, const RealMatrixArray &source_fn_hessians, const ActiveSet &source_set) |
| object. Care is taken to allow different derivative array sizing. | |
| void | copy_results_partial (size_t start_index_target, size_t num_items, const Response &response, size_t start_index_source) |
| The response objects may have different numbers of response functions. | |
| void | copy_results_partial (size_t start_index_target, size_t num_items, const RealVector &source_fn_vals, const RealMatrix &source_fn_grads, const RealMatrixArray &source_fn_hessians, const ActiveSet &source_set, size_t start_index_source) |
| of response functions. | |
| void | reshape (const size_t &num_fns, const size_t &num_params, bool grad_flag, bool hess_flag) |
| rehapes response data arrays | |
| void | reset () |
| handle class forward to corresponding body class member function | |
| void | reset_inactive () |
| handle class forward to corresponding body class member function | |
| bool | is_null () const |
| function to check responseRep (does this handle contain a body) | |
Private Attributes | |
| ResponseRep * | responseRep |
| pointer to the body (handle-body idiom) | |
Friends | |
| bool | operator== (const Response &resp1, const Response &resp2) |
| equality operator | |
| bool | operator!= (const Response &resp1, const Response &resp2) |
| inequality operator | |
The Response class is a container class for an abstract set of functions (functionValues) and their first (functionGradients) and second (functionHessians) derivatives. The functions may involve objective and constraint functions (optimization data set), least squares terms (parameter estimation data set), or generic response functions (uncertainty quantification data set). It is not currently part of a class hierarchy, since the abstraction has been sufficiently general and has not required specialization. For memory efficiency, it employs the "handle-body idiom" approach to reference counting and representation sharing (see Coplien "Advanced C++", p. 58), for which Response serves as the handle and ResponseRep serves as the body.
| Response | ( | ) |
default constructor
Need a populated problem description database to build a meaningful Response object, so set the responseRep=NULL in default constructor for efficiency. This then requires a check on NULL in the copy constructor, assignment operator, and destructor.
1.5.1