Dakota  Version 6.15
Explore and Predict with Confidence
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SharedResponseData Class Reference

Container class encapsulating variables data that can be shared among a set of Response instances. More...

Public Member Functions

 SharedResponseData ()
 default constructor
 
 SharedResponseData (const ProblemDescDB &problem_db)
 standard constructor
 
 SharedResponseData (const ActiveSet &set)
 alternate on-the-fly constructor (explicit disallows its use for implicit type conversion so that instantiations of Response(set) are invalid)
 
 SharedResponseData (const SharedResponseData &srd)
 copy constructor
 
 ~SharedResponseData ()
 destructor
 
SharedResponseDataoperator= (const SharedResponseData &srd)
 assignment operator
 
bool operator== (const SharedResponseData &other)
 experimental operator== for use in unit testing
 
size_t num_scalar_responses () const
 number of scalar responses: primary_scalar + nonlinear constraints; note that these are non-contiguous when primary fields are present.
 
size_t num_scalar_primary () const
 number of scalar primary responses (objectives, calibration terms, generic)
 
size_t num_field_response_groups () const
 number of primary fields (primary field groups)
 
size_t num_response_groups () const
 total number of response groups (number scalars + number pri field groups)
 
size_t num_field_functions () const
 total number of primary field functions (elements); 1-norm of priFieldLengths
 
size_t num_primary_functions () const
 number of primary functions (pri scalars + 1-norm of priFieldLengths)
 
size_t num_functions () const
 total number of response functions (pri scalars + 1-norm of priFieldLengths + secondary scalars)
 
const IntVector & field_lengths () const
 length of each primary field
 
void field_lengths (const IntVector &field_lens)
 set field lengths (e.g., if experiment different from simulation)
 
const IntVector & num_coords_per_field () const
 number of independent coordinates for each primary field
 
const String & function_label (size_t i) const
 return a response function identifier string
 
const StringArray & function_labels () const
 return the response function identifier strings
 
StringArray & function_labels ()
 return the response function identifier strings
 
void function_label (const String &label, size_t i)
 set a response function identifier string
 
void function_labels (const StringArray &labels)
 set the response function identifier strings
 
const StringArray & field_group_labels () const
 return the coarse (per-group) primary field response labels
 
void field_group_labels (const StringArray &field_labels)
 set the coarse primary field group labels (must agree with number fields)
 
const String & responses_id () const
 return the response identifier
 
short response_type () const
 return the response type: {BASE,SIMULATION,EXPERIMENT}_RESPONSE
 
void response_type (short type)
 set the response type: {BASE,SIMULATION,EXPERIMENT}_RESPONSE
 
short primary_fn_type () const
 get the primary function type (generic, objective, calibration)
 
void primary_fn_type (short type)
 set the primary function type (generic, objective, calibration)
 
const RealVector & simulation_error () const
 retrieve simulation variance
 
SharedResponseData copy () const
 create a deep copy of the current object and return by value More...
 
void reshape (size_t num_fns)
 reshape the data, disconnecting a shared rep if necessary
 
void reshape_labels (StringArray &resp_labels, size_t num_fns)
 reshape the response labels using inflation/deflation if possible
 
bool is_null () const
 return true if empty handle with null representation
 
long reference_count () const
 how many handles (including this) are sharing this representation (body); for debugging/testing only
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 serialize through the pointer, which requires object tracking: write and read are symmetric for this class
 

Private Attributes

boost::shared_ptr
< SharedResponseDataRep
srdRep
 pointer to the body (handle-body idiom)
 

Friends

class boost::serialization::access
 allow boost access to serialize this class
 

Detailed Description

Container class encapsulating variables data that can be shared among a set of Response instances.

An array of Response objects (e.g., Analyzer::allResponse) contains repeated configuration data (id's, labels, counts). SharedResponseData employs a handle-body idiom to allow this shared data to be managed in a single object with many references to it, one per Response object in the array. This allows scaling to larger sample sets.

Member Function Documentation

SharedResponseData copy ( ) const

create a deep copy of the current object and return by value

Deep copies are used when recasting changes the nature of a Response set.

References SharedResponseData::srdRep.

Referenced by ExperimentData::add_data(), ExperimentData::ExperimentData(), ExperimentData::initialize(), and ExperimentData::load_data().


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