45 #ifndef ROL_SAMPLEDSCALAR_H
46 #define ROL_SAMPLEDSCALAR_H
50 template <
class Real,
class Key=std::vector<Real>>
62 void reset(
const bool flag =
true) {
64 typename std::map<Key, int>::iterator it;
66 flags_[it->second] =
false;
83 void update(
const bool flag =
true) {
90 bool get(Real &x,
const Key ¶m) {
95 typename std::map<Key, int>::iterator it =
indices_.find(param);
103 indices_.insert(std::pair<Key, int>(param, index));
105 scalars_.push_back(
static_cast<Real
>(0));
113 void set(
const Real &x,
const Key ¶m) {
117 typename std::map<Key, int>::iterator it =
indices_.find(param);
123 indices_.insert(std::pair<Key, int>(param, index));