42#ifndef STOKHOS_GROWTH_RULES
43#define STOKHOS_GROWTH_RULES
48 template <
typename value_type>
59 virtual value_type
operator() (
const value_type& x)
const = 0;
63 template <
typename value_type>
73 virtual value_type
operator() (
const value_type& x)
const {
return x; }
77 template <
typename value_type>
82 const value_type& b_ = value_type(0)) :
89 virtual value_type
operator() (
const value_type& x)
const {
return a*x+
b; }
107 template <
typename value_type>
118 if (x % value_type(2) == value_type(1))
return x+value_type(1);
125 template <
typename value_type>
136 if (x == value_type(0))
return value_type(0);
137 return std::pow(value_type(2),x-value_type(1));
143 template <
typename value_type>
158 if (x == value_type(0))
return value_type(0);
159 return 3*std::pow(value_type(2),x-value_type(1))-value_type(1);
An exponential growth rule for Clenshaw-Curtis.
virtual value_type operator()(const value_type &x) const
Evaluate growth rule.
virtual ~ClenshawCurtisExponentialGrowthRule()
Destructor.
ClenshawCurtisExponentialGrowthRule()
Constructor.
A growth rule that always makes the supplied order even.
virtual value_type operator()(const value_type &x) const
Evaluate growth rule.
virtual ~EvenGrowthRule()
Destructor.
EvenGrowthRule()
Constructor.
An exponential growth rule for Gauss-Patterson.
GaussPattersonExponentialGrowthRule()
Constructor.
virtual value_type operator()(const value_type &x) const
Evaluate growth rule.
virtual ~GaussPattersonExponentialGrowthRule()
Destructor.
Interface for abstract growth rules.
virtual ~GrowthRule()
Destructor.
virtual value_type operator()(const value_type &x) const =0
Evaluate growth rule.
A growth rule that is the identity.
virtual value_type operator()(const value_type &x) const
Evaluate growth rule.
virtual ~IdentityGrowthRule()
Destructor.
IdentityGrowthRule()
Constructor.
virtual ~LinearGrowthRule()
Destructor.
virtual value_type operator()(const value_type &x) const
Evaluate growth rule.
LinearGrowthRule(const value_type &a_=value_type(1), const value_type &b_=value_type(0))
Constructor.
Top-level namespace for Stokhos classes and functions.