10 #ifndef STOKHOS_ORTHOGPOLYAPPROX_HPP
11 #define STOKHOS_ORTHOGPOLYAPPROX_HPP
142 std::ostream&
print(std::ostream& os)
const;
155 template <
typename ordinal_type,
typename value_type,
typename node_type>
164 #endif // STOKHOS_ORTHOGPOLYAPPROX_HPP
value_type two_norm_squared() const
Compute the squared two-norm of expansion.
const double & const_reference
void resize(ordinal_type sz)
Resize coefficient array (coefficients are preserved)
value_type evaluate(const Teuchos::Array< value_type > &point) const
Evaluate polynomial approximation at a point.
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis_
Basis expansion is relative to.
OrthogPolyApprox & operator=(const OrthogPolyApprox &x)
Assignment operator (deep copy)
void init(const value_type &v)
Initialize coefficients to value.
OrthogPolyApprox(const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &basis=Teuchos::null, ordinal_type sz=0, const value_type *vals=NULL)
Constructor with supplied size sz.
~OrthogPolyApprox()
Destructor.
pointer coeff()
Return coefficient array.
value_type two_norm() const
Compute the two-norm of expansion.
value_type inner_product(const OrthogPolyApprox &b) const
Compute the L2 inner product of 2 PCEs.
value_type standard_deviation() const
Compute standard deviation of expansion.
Abstract base class for multivariate orthogonal polynomials.
reference operator[](ordinal_type i)
Array access.
storage_type::reference reference
void load(OrthogPolyApprox< ordinal_type, value_type, S > &v)
Load coefficients into an OrthogPolyApprox with different storage.
std::ostream & operator<<(std::ostream &os, const ProductContainer< coeff_type > &vec)
storage_type coeff_
OrthogPolyApprox coefficients.
void reset(const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &new_basis, ordinal_type sz=0)
Reset to a new basis.
void init(const OrthogPolyApprox< ordinal_type, value_type, S > &v)
Initialize coefficients from an OrthogPolyApprox with different storage.
const double * const_pointer
void load(pointer v)
Load values to an array of values.
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis() const
Return basis.
storage_type::pointer pointer
void load(value_type *v)
Load coefficients to an array of values.
value_type mean() const
Compute mean of expansion.
storage_type::const_reference const_reference
storage_type::const_pointer const_pointer
Class to store coefficients of a projection onto an orthogonal polynomial basis.
void init(const_reference v)
Initialize values to a constant value.
std::ostream & print(std::ostream &os) const
Print approximation in basis.
ordinal_type size() const
Return size.
const MultiIndex< ordinal_type > & order(ordinal_type term) const
Get orders for a given term.
reference term(ordinal_type dimension, ordinal_type order)
Get coefficient term for given dimension and order.