44template <
typename ordinal_type,
typename value_type>
47 RecurrenceBasis<ordinal_type, value_type>(
"Legendre", p, normalize, growth)
51#ifdef HAVE_STOKHOS_DAKOTA
56template <
typename ordinal_type,
typename value_type>
69template <
typename ordinal_type,
typename value_type>
75template <
typename ordinal_type,
typename value_type>
79 Teuchos::Array<value_type>& theAlpha,
80 Teuchos::Array<value_type>& theBeta,
81 Teuchos::Array<value_type>& theDelta,
82 Teuchos::Array<value_type>& theGamma)
const
92 for (ordinal_type i=1; i<n; i++) {
95 theBeta[i] = value_type(i) / value_type(i+1);
96 theDelta[i] = value_type(2*i+1) / value_type(i+1);
103template <
typename ordinal_type,
typename value_type>
104Teuchos::RCP<Stokhos::OneDOrthogPolyBasis<ordinal_type,value_type> >
Legendre polynomial basis.
LegendreBasis(ordinal_type p, bool normalize=false, GrowthPolicy growth=SLOW_GROWTH)
Constructor.
~LegendreBasis()
Destructor.
virtual bool computeRecurrenceCoefficients(ordinal_type n, Teuchos::Array< value_type > &alpha, Teuchos::Array< value_type > &beta, Teuchos::Array< value_type > &delta, Teuchos::Array< value_type > &gamma) const
Compute recurrence coefficients.
virtual Teuchos::RCP< OneDOrthogPolyBasis< ordinal_type, value_type > > cloneWithOrder(ordinal_type p) const
Clone this object with the option of building a higher order basis.
Implementation of OneDOrthogPolyBasis based on the general three-term recurrence relationship:
Teuchos::Array< value_type > alpha
Recurrence coefficients.
Teuchos::Array< value_type > beta
Recurrence coefficients.
ordinal_type p
Order of basis.
Teuchos::Array< value_type > gamma
Recurrence coefficients.
Teuchos::Array< value_type > delta
Recurrence coefficients.
virtual void setSparseGridGrowthRule(LevelToOrderFnPtr ptr)
Set sparse grid rule.
virtual void setup()
Setup basis after computing recurrence coefficients.
GrowthPolicy
Enumerated type for determining Smolyak growth policies.