45 #ifndef ROL_SAMPLEDVECTOR_H 46 #define ROL_SAMPLEDVECTOR_H 56 std::vector<ROL::Ptr<Vector<Real> > >
vectors_;
62 void reset(
const bool flag =
true) {
64 typename std::map<std::vector<Real>,
int>::iterator it;
65 for (it = indices_.begin(); it != indices_.end(); ++it) {
66 flags_[it->second] =
false;
75 : maxIndex_(0), updated_(false) {
83 void update(
const bool flag =
true) {
91 const std::vector<Real> ¶m) {
92 int count = indices_.count(param);
96 typename std::map<std::vector<Real>,
int>::iterator it
97 = indices_.find(param);
101 x.set(*vectors_[index]);
106 std::pair<std::vector<Real>,
int>(param, index));
107 flags_.push_back(
false);
108 vectors_.push_back(x.clone());
117 const std::vector<Real> ¶m) {
118 int count = indices_.count(param);
121 typename std::map<std::vector<Real>,
int>::iterator it
122 = indices_.find(param);
124 flags_[index] =
true;
125 vectors_[index]->set(x);
129 std::pair<std::vector<Real>,
int>(param, index));
130 flags_.push_back(
true);
131 vectors_.push_back(x.clone());
132 vectors_[index]->set(x);
void reset(const bool flag=true)
std::vector< ROL::Ptr< Vector< Real > > > vectors_
Defines the linear algebra or vector space interface.
SampledVector(void)
Constructor.
std::vector< bool > flags_
std::map< std::vector< Real >, int > indices_
void update(const bool flag=true)
Update for SampledVector storage.