44 #ifndef ROL_SAMPLEGENERATOR_HPP 45 #define ROL_SAMPLEGENERATOR_HPP 47 #include "Teuchos_RefCountPtr.hpp" 57 Teuchos::RCP<BatchManager<Real> >
bman_;
62 void setPoints(std::vector<std::vector<Real> > &p) {
64 points_.assign(p.begin(),p.end());
68 weights_.assign(w.begin(),w.end());
74 : begin_(0), bman_(bman) {}
76 : begin_(sampler.begin_), bman_(sampler.bman_),
77 points_(sampler.points_), weights_(sampler.weights_) {}
102 return weights_.size();
114 return bman_->batchID();
118 return bman_->numBatches();
121 void sumAll(Real *input, Real *output,
int dim)
const {
122 bman_->sumAll(input, output, dim);
126 bman_->sumAll(input,output);
virtual ~SampleGenerator()
void sumAll(Vector< Real > &input, Vector< Real > &output) const
virtual void update(const Vector< Real > &x)
Teuchos::RCP< BatchManager< Real > > bman_
virtual void setSamples(bool inConstructor=false)
virtual std::vector< Real > getMyPoint(const int i) const
virtual Real getMyWeight(const int i) const
Defines the linear algebra or vector space interface.
virtual int numMySamples(void) const
void sumAll(Real *input, Real *output, int dim) const
virtual void refine(void)
std::vector< Real > weights_
SampleGenerator(const SampleGenerator< Real > &sampler)
std::vector< std::vector< Real > > points_
SampleGenerator(const Teuchos::RCP< BatchManager< Real > > &bman)
virtual Real computeError(std::vector< Teuchos::RCP< Vector< Real > > > &vals, const Vector< Real > &x)
int numBatches(void) const
virtual Real computeError(std::vector< Real > &vals)
void setPoints(std::vector< std::vector< Real > > &p)
void setWeights(std::vector< Real > &w)