ROL
ROL_SROMGenerator.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ************************************************************************
3 //
4 // Rapid Optimization Library (ROL) Package
5 // Copyright (2014) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact lead developers:
38 // Drew Kouri (dpkouri@sandia.gov) and
39 // Denis Ridzal (dridzal@sandia.gov)
40 //
41 // ************************************************************************
42 // @HEADER
43 
44 #ifndef ROL_SROMGENERATOR_HPP
45 #define ROL_SROMGENERATOR_HPP
46 
47 #include "ROL_SampleGenerator.hpp"
48 
49 #include "ROL_Objective.hpp"
50 #include "ROL_BoundConstraint.hpp"
52 
53 #include "ROL_Algorithm.hpp"
54 #include "ROL_BoundConstraint.hpp"
55 
56 #include "ROL_MomentObjective.hpp"
57 #include "ROL_CDFObjective.hpp"
59 #include "ROL_SROMVector.hpp"
60 
61 #include "ROL_StdVector.hpp"
62 
63 namespace ROL {
64 
65 template<class Real>
66 class SROMGenerator : public SampleGenerator<Real> {
67 private:
68  // Parameterlist for optimization
69  Teuchos::ParameterList parlist_;
70  // Vector of distributions (size = dimension of space)
71  std::vector<Teuchos::RCP<Distribution<Real> > > dist_;
72 
73  const int dimension_;
77  bool adaptive_;
78  bool print_;
79 
80  Real ptol_;
81  Real atol_;
82 
84  const AtomVector<Real> &atom) {
85  // Remove points with zero weight
86  std::vector<std::vector<Real> > pts;
87  std::vector<Real> wts;
88  for (int i = 0; i < numMySamples_; i++) {
89  if ( prob.getProbability(i) > ptol_ ) {
90  pts.push_back(*(atom.getAtom(i)));
91  wts.push_back(prob.getProbability(i));
92  }
93  }
94  numMySamples_ = wts.size();
95  // Remove atoms that are within atol of each other
96  Real err = 0.0;
97  std::vector<Real> pt;
98  std::vector<int> ind;
99  for (int i = 0; i < numMySamples_; i++) {
100  pt = pts[i]; ind.clear();
101  for (int j = i+1; j < numMySamples_; j++) {
102  err = 0.0;
103  for (int d = 0; d < dimension_; d++) {
104  err += std::pow(pt[d] - pts[j][d],2);
105  }
106  err = std::sqrt(err);
107  if ( err < atol_ ) {
108  ind.push_back(j);
109  for (int d = 0; d < dimension_; d++) {
110  pts[i][d] += pts[j][d];
111  wts[i] += wts[j];
112  }
113  }
114  }
115  if ( ind.size() > 0 ) {
116  for (int d = 0; d < dimension_; d++) {
117  pts[i][d] /= (Real)(ind.size()+1);
118  }
119  for (int k = ind.size()-1; k >= 0; k--) {
120  pts.erase(pts.begin()+ind[k]);
121  wts.erase(wts.begin()+ind[k]);
122  }
123  }
124  numMySamples_ = wts.size();
125  }
126  // Renormalize weights
127  Real psum = 0.0, sum = 0.0;
128  for (int i = 0; i < numMySamples_; i++) {
129  psum += wts[i];
130  }
131  SampleGenerator<Real>::sumAll(&psum,&sum,1);
132  for (int i = 0; i < numMySamples_; i++) {
133  wts[i] /= sum;
134  }
135  // Set points and weights
138  }
139 
140 public:
141 
142  SROMGenerator(Teuchos::ParameterList &parlist,
143  const Teuchos::RCP<BatchManager<Real> > &bman,
144  const std::vector<Teuchos::RCP<Distribution<Real> > > &dist)
145  : SampleGenerator<Real>(bman), parlist_(parlist), dist_(dist),
146  dimension_(dist.size()) {
147  // Get SROM sublist
148  Teuchos::ParameterList list = parlist.sublist("SOL").sublist("Sample Generator").sublist("SROM");
149  numSamples_ = list.get("Number of Samples",50);
150  adaptive_ = list.get("Adaptive Sampling",false);
151  numNewSamples_ = list.get("Number of New Samples Per Adaptation",0);
152  print_ = list.get("Output to Screen",false);
153  ptol_ = list.get("Probability Tolerance",1.e2*std::sqrt(ROL_EPSILON<Real>()));
154  atol_ = list.get("Atom Tolerance",1.e2*std::sqrt(ROL_EPSILON<Real>()));
156  // Compute batch local number of samples
157  int rank = (int)SampleGenerator<Real>::batchID();
158  int nProc = (int)SampleGenerator<Real>::numBatches();
159  int frac = numSamples_ / nProc;
160  int rem = numSamples_ % nProc;
161  numMySamples_ = frac + ((rank < rem) ? 1 : 0);
162  // Initialize vectors
163  Teuchos::RCP<ProbabilityVector<Real> > prob, prob_lo, prob_hi, prob_eq;
164  Teuchos::RCP<AtomVector<Real> > atom, atom_lo, atom_hi, atom_eq;
165  Teuchos::RCP<Vector<Real> > x, x_lo, x_hi, x_eq;
166  initialize_vectors(prob,prob_lo,prob_hi,prob_eq,atom,atom_lo,atom_hi,atom_eq,x,x_lo,x_hi,x_eq,bman);
167  Teuchos::RCP<Vector<Real> > l
168  = Teuchos::rcp(new StdVector<Real>(Teuchos::rcp(new std::vector<Real>(1,0.))));
169  bool optProb = false, optAtom = true;
170  for ( int i = 0; i < 2; i++ ) {
171  if ( i == 0 ) { optProb = false; optAtom = true; }
172  if ( i == 1 ) { optProb = true; optAtom = true; }
173  // Initialize objective function
174  std::vector<Teuchos::RCP<Objective<Real> > > obj_vec;
175  Teuchos::RCP<Objective<Real> > obj;
176  initialize_objective(obj_vec,obj,dist,bman,optProb,optAtom,list);
177  // Initialize constraints
178  Teuchos::RCP<BoundConstraint<Real> > bnd
179  = Teuchos::rcp(new BoundConstraint<Real>(x_lo,x_hi));
180  Teuchos::RCP<EqualityConstraint<Real> > con
181  = Teuchos::rcp(new ScalarLinearEqualityConstraint<Real>(x_eq,1.0));
182  // Test objective and constraints
183  if ( print_ ) { std::cout << "\nCheck derivatives of CDFObjective\n"; }
184  check_objective(*x,obj_vec[0],bman,optProb,optAtom);
185  if ( print_ ) { std::cout << "\nCheck derivatives of MomentObjective\n"; }
186  check_objective(*x,obj_vec[1],bman,optProb,optAtom);
187  if ( print_ ) { std::cout << "\nCheck derivatives of LinearCombinationObjective\n"; }
188  check_objective(*x,obj,bman,optProb,optAtom);
189  if ( print_ && optProb ) { std::cout << "\nCheck ScalarLinearEqualityConstraint\n"; }
190  check_constraint(*x,con,bman,optProb);
191  // Solve optimization problems to sample
192  Teuchos::RCP<Algorithm<Real> > algo;
193  initialize_optimizer(algo,list,optProb);
194  if ( optProb ) {
195  std::string type = list.sublist("Step").get("Type","Trust Region");
196  Teuchos::RCP<Teuchos::ParameterList> plist = Teuchos::rcpFromRef(list);
197  Teuchos::RCP<OptimizationProblem<Real> > optProblem;
198  if (type == "Augmented Lagrangian") {
199  Teuchos::RCP<Objective<Real> > augLag
200  = Teuchos::rcp(new AugmentedLagrangian<Real>(obj,con,*l,1.,*x,l->dual(),parlist));
201  optProblem = Teuchos::rcp(new OptimizationProblem<Real>(augLag,x,bnd,con,l,plist));
202  }
203  else if (type == "Moreau-Yosida Penalty") {
204  Teuchos::RCP<Objective<Real> > myPen
205  = Teuchos::rcp(new MoreauYosidaPenalty<Real>(obj,bnd,*x,10.0));
206  optProblem = Teuchos::rcp(new OptimizationProblem<Real>(myPen,x,bnd,con,l,plist));
207  }
208  else {
209  optProblem = Teuchos::rcp(new OptimizationProblem<Real>(obj,x,bnd,con,l,plist));
210  }
211  //ROL::OptimizationProblem<Real> optProblem(obj,x,bnd,con,l,plist);
212  algo->run(*optProblem,print_);
213  }
214  else {
215  algo->run(*x,*obj,*bnd,print_);
216  }
217  }
218  // Prune samples with zero weight and set samples/weights
219  pruneSamples(*prob,*atom);
220  }
221 
222  void refine(void) {}
223 
224 private:
225 
226  void get_scaling_vectors(std::vector<Real> &typw, std::vector<Real> &typx) const {
227  typw.clear(); typx.clear();
228  typw.resize(numMySamples_,(Real)(numSamples_*numSamples_));
229  typx.resize(numMySamples_*dimension_,0);
230  Real mean = 1, var = 1, one(1);
231  for (int j = 0; j < dimension_; j++) {
232  mean = std::abs(dist_[j]->moment(1));
233  var = dist_[j]->moment(2) - mean*mean;
234  mean = ((mean > ROL_EPSILON<Real>()) ? mean : std::sqrt(var));
235  mean = ((mean > ROL_EPSILON<Real>()) ? mean : one);
236  for (int i = 0; i < numMySamples_; i++) {
237  typx[i*dimension_ + j] = one/(mean*mean);
238  }
239  }
240  }
241 
242  void initialize_vectors(Teuchos::RCP<ProbabilityVector<Real> > &prob,
243  Teuchos::RCP<ProbabilityVector<Real> > &prob_lo,
244  Teuchos::RCP<ProbabilityVector<Real> > &prob_hi,
245  Teuchos::RCP<ProbabilityVector<Real> > &prob_eq,
246  Teuchos::RCP<AtomVector<Real> > &atom,
247  Teuchos::RCP<AtomVector<Real> > &atom_lo,
248  Teuchos::RCP<AtomVector<Real> > &atom_hi,
249  Teuchos::RCP<AtomVector<Real> > &atom_eq,
250  Teuchos::RCP<Vector<Real> > &vec,
251  Teuchos::RCP<Vector<Real> > &vec_lo,
252  Teuchos::RCP<Vector<Real> > &vec_hi,
253  Teuchos::RCP<Vector<Real> > &vec_eq,
254  const Teuchos::RCP<BatchManager<Real> > &bman) const {
255  // Compute scaling for probability and atom vectors
256  std::vector<Real> typx, typw;
257  get_scaling_vectors(typw,typx);
258  // Compute initial guess and bounds for probability and atom vectors
259  std::vector<Real> pt(dimension_*numMySamples_,0.), wt(numMySamples_,1./(Real)numSamples_);
260  std::vector<Real> pt_lo(dimension_*numMySamples_,0.), pt_hi(dimension_*numMySamples_,0.);
261  std::vector<Real> wt_lo(numMySamples_,0.), wt_hi(numMySamples_,1.);
262  std::vector<Real> pt_eq(dimension_*numMySamples_,0.), wt_eq(numMySamples_,1.);
263  Real lo = 0., hi = 0.;
264  srand(12345*SampleGenerator<Real>::batchID());
265  for ( int j = 0; j < dimension_; j++) {
266  lo = dist_[j]->lowerBound();
267  hi = dist_[j]->upperBound();
268  for (int i = 0; i < numMySamples_; i++) {
269  pt[i*dimension_ + j] = dist_[j]->invertCDF((Real)rand()/(Real)RAND_MAX);
270  //pt[i*dimension_ + j] = dist_[j]->invertCDF(0);
271  pt_lo[i*dimension_ + j] = lo;
272  pt_hi[i*dimension_ + j] = hi;
273  }
274  }
275  // Build probability, atom, and SROM vectors
276  prob = Teuchos::rcp(new PrimalProbabilityVector<Real>(
277  Teuchos::rcp(new std::vector<Real>(wt)),bman,
278  Teuchos::rcp(new std::vector<Real>(typw))));
279  atom = Teuchos::rcp(new PrimalAtomVector<Real>(
280  Teuchos::rcp(new std::vector<Real>(pt)),bman,numMySamples_,dimension_,
281  Teuchos::rcp(new std::vector<Real>(typx))));
282  vec = Teuchos::rcp(new SROMVector<Real>(prob,atom));
283  // Lower and upper bounds on Probability Vector
284  prob_lo = Teuchos::rcp(new PrimalProbabilityVector<Real>(
285  Teuchos::rcp(new std::vector<Real>(wt_lo)),bman,
286  Teuchos::rcp(new std::vector<Real>(typw))));
287  prob_hi = Teuchos::rcp(new PrimalProbabilityVector<Real>(
288  Teuchos::rcp(new std::vector<Real>(wt_hi)),bman,
289  Teuchos::rcp(new std::vector<Real>(typw))));
290  // Lower and upper bounds on Atom Vector
291  atom_lo = Teuchos::rcp(new PrimalAtomVector<Real>(
292  Teuchos::rcp(new std::vector<Real>(pt_lo)),bman,numMySamples_,dimension_,
293  Teuchos::rcp(new std::vector<Real>(typx))));
294  atom_hi = Teuchos::rcp(new PrimalAtomVector<Real>(
295  Teuchos::rcp(new std::vector<Real>(pt_hi)),bman,numMySamples_,dimension_,
296  Teuchos::rcp(new std::vector<Real>(typx))));
297  // Lower and upper bounds on SROM Vector
298  vec_lo = Teuchos::rcp(new SROMVector<Real>(prob_lo,atom_lo));
299  vec_hi = Teuchos::rcp(new SROMVector<Real>(prob_hi,atom_hi));
300  // Equality constraint vectors
301  prob_eq = Teuchos::rcp(new DualProbabilityVector<Real>(
302  Teuchos::rcp(new std::vector<Real>(wt_eq)),bman,
303  Teuchos::rcp(new std::vector<Real>(typw))));
304  atom_eq = Teuchos::rcp(new DualAtomVector<Real>(
305  Teuchos::rcp(new std::vector<Real>(pt_eq)),bman,numMySamples_,dimension_,
306  Teuchos::rcp(new std::vector<Real>(typx))));
307  vec_eq = Teuchos::rcp(new SROMVector<Real>(prob_eq,atom_eq));
308  }
309 
310  void initialize_objective(std::vector<Teuchos::RCP<Objective<Real> > > &obj_vec,
311  Teuchos::RCP<Objective<Real> > &obj,
312  const std::vector<Teuchos::RCP<Distribution<Real> > > &dist,
313  const Teuchos::RCP<BatchManager<Real> > &bman,
314  const bool optProb, const bool optAtom,
315  Teuchos::ParameterList &list) const {
316  // Build CDF objective function
317  Real scale = list.get("CDF Smoothing Parameter",1.e-2);
318  obj_vec.push_back(Teuchos::rcp(new CDFObjective<Real>(dist,bman,scale,optProb,optAtom)));
319  // Build moment matching objective function
320  Teuchos::Array<int> tmp_order
321  = Teuchos::getArrayFromStringParameter<int>(list,"Moments");
322  std::vector<int> order(tmp_order.size(),0);
323  for ( int i = 0; i < tmp_order.size(); i++) {
324  order[i] = static_cast<int>(tmp_order[i]);
325  }
326  obj_vec.push_back(Teuchos::rcp(new MomentObjective<Real>(dist,order,bman,optProb,optAtom)));
327  // Build linear combination objective function
328  Teuchos::Array<Real> tmp_coeff
329  = Teuchos::getArrayFromStringParameter<Real>(list,"Coefficients");
330  std::vector<Real> coeff(2,0.);
331  coeff[0] = tmp_coeff[0]; coeff[1] = tmp_coeff[1];
332  obj = Teuchos::rcp(new LinearCombinationObjective<Real>(coeff,obj_vec));
333  }
334 
335  void initialize_optimizer(Teuchos::RCP<Algorithm<Real> > &algo,
336  Teuchos::ParameterList &parlist,
337  const bool optProb) const {
338  std::string type = parlist.sublist("Step").get("Type","Trust Region");
339  if ( optProb ) {
340  if ( type == "Moreau-Yosida Penalty" ) {
341  algo = Teuchos::rcp(new Algorithm<Real>("Moreau-Yosida Penalty",parlist,false));
342  }
343  else if ( type == "Augmented Lagrangian" ) {
344  algo = Teuchos::rcp(new Algorithm<Real>("Augmented Lagrangian",parlist,false));
345  }
346  else {
347  algo = Teuchos::rcp(new Algorithm<Real>("Interior Point",parlist,false));
348  }
349  }
350  else {
351  algo = Teuchos::rcp(new Algorithm<Real>("Trust Region",parlist,false));
352  }
353  }
354 
356  const Teuchos::RCP<Objective<Real> > &obj,
357  const Teuchos::RCP<BatchManager<Real> > &bman,
358  const bool optProb, const bool optAtom) {
359  // Get scaling for probability and atom vectors
360  std::vector<Real> typx, typw;
361  get_scaling_vectors(typw,typx);
362  // Set random direction
363  std::vector<Real> pt(dimension_*numMySamples_,0.), wt(numMySamples_,0.);
364  for (int i = 0; i < numMySamples_; i++) {
365  wt[i] = (optProb ? (Real)rand()/(Real)RAND_MAX : 0);
366  for ( int j = 0; j < dimension_; j++) {
367  pt[i*dimension_ + j] = (optAtom ? dist_[j]->invertCDF((Real)rand()/(Real)RAND_MAX) : 0);
368  }
369  }
370  Teuchos::RCP<ProbabilityVector<Real> > dprob
371  = Teuchos::rcp(new PrimalProbabilityVector<Real>(
372  Teuchos::rcp(new std::vector<Real>(wt)),bman,
373  Teuchos::rcp(new std::vector<Real>(typw))));
374  Teuchos::RCP<AtomVector<Real> > datom
375  = Teuchos::rcp(new PrimalAtomVector<Real>(
376  Teuchos::rcp(new std::vector<Real>(pt)),bman,numMySamples_,dimension_,
377  Teuchos::rcp(new std::vector<Real>(typx))));
378  SROMVector<Real> d = SROMVector<Real>(dprob,datom);
379  // Check derivatives
380  obj->checkGradient(x,d,print_);
381  obj->checkHessVec(x,d,print_);
382  }
383 
385  const Teuchos::RCP<EqualityConstraint<Real> > &con,
386  const Teuchos::RCP<BatchManager<Real> > &bman,
387  const bool optProb) {
388  if ( optProb ) {
389  StdVector<Real> c(Teuchos::rcp(new std::vector<Real>(1,1.0)));
390  // Get scaling for probability and atom vectors
391  std::vector<Real> typx, typw;
392  get_scaling_vectors(typw,typx);
393  // Set random direction
394  std::vector<Real> pt(dimension_*numMySamples_,0.), wt(numMySamples_,0.);
395  for (int i = 0; i < numMySamples_; i++) {
396  wt[i] = (Real)rand()/(Real)RAND_MAX;
397  for ( int j = 0; j < dimension_; j++) {
398  pt[i*dimension_ + j] = dist_[j]->invertCDF((Real)rand()/(Real)RAND_MAX);
399  }
400  }
401  Teuchos::RCP<ProbabilityVector<Real> > dprob
402  = Teuchos::rcp(new PrimalProbabilityVector<Real>(
403  Teuchos::rcp(new std::vector<Real>(wt)),bman,
404  Teuchos::rcp(new std::vector<Real>(typw))));
405  Teuchos::RCP<AtomVector<Real> > datom
406  = Teuchos::rcp(new PrimalAtomVector<Real>(
407  Teuchos::rcp(new std::vector<Real>(pt)),bman,numMySamples_,dimension_,
408  Teuchos::rcp(new std::vector<Real>(typx))));
409  SROMVector<Real> d = SROMVector<Real>(dprob,datom);
410  // Check derivatives
411  con->checkApplyJacobian(x,d,c,print_);
412  con->checkAdjointConsistencyJacobian(c,d,x,print_);
413  }
414  }
415 };
416 
417 }
418 
419 #endif
Provides the interface to evaluate objective functions.
Provides the interface to evaluate the augmented Lagrangian.
Provides the std::vector implementation of the ROL::Vector interface.
This equality constraint defines an affine hyperplane.
void check_objective(const Vector< Real > &x, const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< BatchManager< Real > > &bman, const bool optProb, const bool optAtom)
void check_constraint(const Vector< Real > &x, const Teuchos::RCP< EqualityConstraint< Real > > &con, const Teuchos::RCP< BatchManager< Real > > &bman, const bool optProb)
void sumAll(Real *input, Real *output, int dim) const
void initialize_optimizer(Teuchos::RCP< Algorithm< Real > > &algo, Teuchos::ParameterList &parlist, const bool optProb) const
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:74
void get_scaling_vectors(std::vector< Real > &typw, std::vector< Real > &typx) const
Defines the equality constraint operator interface.
void initialize_vectors(Teuchos::RCP< ProbabilityVector< Real > > &prob, Teuchos::RCP< ProbabilityVector< Real > > &prob_lo, Teuchos::RCP< ProbabilityVector< Real > > &prob_hi, Teuchos::RCP< ProbabilityVector< Real > > &prob_eq, Teuchos::RCP< AtomVector< Real > > &atom, Teuchos::RCP< AtomVector< Real > > &atom_lo, Teuchos::RCP< AtomVector< Real > > &atom_hi, Teuchos::RCP< AtomVector< Real > > &atom_eq, Teuchos::RCP< Vector< Real > > &vec, Teuchos::RCP< Vector< Real > > &vec_lo, Teuchos::RCP< Vector< Real > > &vec_hi, Teuchos::RCP< Vector< Real > > &vec_eq, const Teuchos::RCP< BatchManager< Real > > &bman) const
Provides an interface to run optimization algorithms.
Provides the interface to evaluate the Moreau-Yosida penalty function.
Teuchos::RCP< const std::vector< Real > > getAtom(const int i) const
Teuchos::ParameterList parlist_
Provides the std::vector implementation of the ROL::Vector interface.
void initialize_objective(std::vector< Teuchos::RCP< Objective< Real > > > &obj_vec, Teuchos::RCP< Objective< Real > > &obj, const std::vector< Teuchos::RCP< Distribution< Real > > > &dist, const Teuchos::RCP< BatchManager< Real > > &bman, const bool optProb, const bool optAtom, Teuchos::ParameterList &list) const
Provides the std::vector implementation of the ROL::Vector interface.
SROMGenerator(Teuchos::ParameterList &parlist, const Teuchos::RCP< BatchManager< Real > > &bman, const std::vector< Teuchos::RCP< Distribution< Real > > > &dist)
Provides the interface to apply upper and lower bound constraints.
const Real getProbability(const int i) const
std::vector< Teuchos::RCP< Distribution< Real > > > dist_
void setPoints(std::vector< std::vector< Real > > &p)
void setWeights(std::vector< Real > &w)
void pruneSamples(const ProbabilityVector< Real > &prob, const AtomVector< Real > &atom)