1 /* _______________________________________________________________________ 2 3 PECOS: Parallel Environment for Creation Of Stochastics 4 Copyright (c) 2011, Sandia National Laboratories. 5 This software is distributed under the GNU Lesser General Public License. 6 For more information, see the README file in the top Pecos directory. 7 _______________________________________________________________________ */ 8 9 #ifndef PECOS_SURROGATES_BOUNDED_VARIABLES_HPP 10 #define PECOS_SURROGATES_BOUNDED_VARIABLES_HPP 11 12 #include <Variables.hpp> 13 #include <teuchos_data_types.hpp> 14 15 namespace Pecos { 16 namespace surrogates { 17 18 /** 19 \class BoundedVariables 20 \brief The object representing the meta data of a vector of bounded 21 variables. 22 */ 23 class BoundedVariables : public Variables{ 24 public: 25 BoundedVariables(); 26 27 virtual ~BoundedVariables(); 28 29 /**\brief return the upper bound of the ith variable 30 31 \param[in] i The ith dimension for which the upper bound is requested 32 */ 33 Real ub(int i) const; 34 35 /**\brief return the lower bound of the ith variable 36 37 \param[in] i The ith dimension for which the lower bound is requested 38 */ 39 Real lb(int i) const; 40 41 /** \brief set the ranges of the variables. 42 43 \param[in] ranges (2*num_vars x 1) vector 44 [lb1,ub1,...,lbd,upb] where lb1 and ub1 are the lower and 45 upper bound of the 1st variable and so on. 46 */ 47 void set_ranges(const RealVector &ranges); 48 49 void set_options(const util::OptionsList &opts); 50 51 private: 52 53 /// The ranges of the bounded random variables 54 RealVector ranges_; 55 56 }; // class BoundedVariables 57 58 59 void define_homogeneous_ranges(int num_vars, Real lb, Real ub, 60 RealVector &result); 61 62 } // namespace surrogates 63 } // namespace Pecos 64 65 #endif // include guard 66