Dakota  Version 6.21
Explore and Predict with Confidence
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ActiveSet Class Reference

Container class for active set tracking information. Contains the active set request vector and the derivative variables vector. More...

Public Member Functions

 ActiveSet ()
 default constructor
 
 ActiveSet (size_t num_fns, size_t num_deriv_vars)
 standard constructor
 
 ActiveSet (size_t num_fns)
 partial constructor
 
 ActiveSet (const ShortArray &asv, const SizetArray &dvv)
 alt constructor
 
 ActiveSet (const ActiveSet &set)
 copy constructor
 
 ~ActiveSet ()
 destructor
 
ActiveSetoperator= (const ActiveSet &set)
 assignment operator
 
void reshape (size_t num_fns, size_t num_deriv_vars)
 reshape requestVector and derivVarsVector
 
void reshape (size_t num_fns)
 reshape requestVector
 
const ShortArray & request_vector () const
 return the request vector
 
ShortArray & request_vector ()
 return the request vector
 
void request_vector (const ShortArray &rv)
 set the request vector
 
void request_values (const short rv_val)
 set all request vector values
 
void request_values (const short rv_val, size_t start, size_t end)
 set all request vector values in a range
 
short request_value (const size_t index) const
 get the value of an entry in the request vector
 
void request_value (const short rv_val, const size_t index)
 set the value of an entry in the request vector
 
const SizetArray & derivative_vector () const
 return the derivative variables vector
 
SizetArray & derivative_vector ()
 return the derivative variables vector
 
void derivative_vector (const SizetArray &dvv)
 set the derivative variables vector from a SizetArray
 
void derivative_vector (SizetMultiArrayConstView dvv)
 set the derivative variables vector from a SizetMultiArrayConstView
 
void derivative_start_value (size_t dvv_start_val)
 set the derivative variables vector values
 
void read (std::istream &s)
 read an active set object from an std::istream
 
void write (std::ostream &s) const
 write an active set object to an std::ostream
 
void write_annotated (std::ostream &s) const
 write an active set object to an std::ostream in annotated format
 
void read (MPIUnpackBuffer &s)
 read an active set object from a packed MPI buffer
 
void write (MPIPackBuffer &s) const
 write an active set object to a packed MPI buffer
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 implementation of Boost serialize for ActiveSet
 

Private Attributes

ShortArray requestVector
 the vector of response requests More...
 
SizetArray derivVarsVector
 the vector of variable ids used for computing derivatives More...
 

Friends

class boost::serialization::access
 
bool operator== (const ActiveSet &set1, const ActiveSet &set2)
 equality operator
 
bool operator!= (const ActiveSet &set1, const ActiveSet &set2)
 inequality operator
 

Detailed Description

Container class for active set tracking information. Contains the active set request vector and the derivative variables vector.

The ActiveSet class is a small class whose initial design function is to avoid having to pass the ASV and DVV separately. It is not part of a class hierarchy and does not employ reference-counting/ representation-sharing idioms (e.g., handle-body).

Member Data Documentation

◆ requestVector

ShortArray requestVector
private

the vector of response requests

It uses a 0 value for inactive functions and sums 1 (value), 2 (gradient), and 4 (Hessian) for active functions.

Referenced by ActiveSet::ActiveSet(), ActiveSet::operator=(), ActiveSet::read(), ActiveSet::request_value(), ActiveSet::request_values(), ActiveSet::request_vector(), ActiveSet::reshape(), ActiveSet::write(), and ActiveSet::write_annotated().

◆ derivVarsVector

SizetArray derivVarsVector
private

the vector of variable ids used for computing derivatives

These ids will generally identify either the active continuous variables or the inactive continuous variables.

Referenced by ActiveSet::ActiveSet(), ActiveSet::derivative_start_value(), ActiveSet::derivative_vector(), ActiveSet::operator=(), ActiveSet::read(), ActiveSet::reshape(), ActiveSet::write(), and ActiveSet::write_annotated().


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