Stokhos::OrthogPolyApprox< ordinal_type, value_type > Class Template Reference

Class to store coefficients of a projection onto an orthogonal polynomial basis. More...

#include <Stokhos_OrthogPolyApprox.hpp>

List of all members.

Public Member Functions

 OrthogPolyApprox ()
 Constructor with no basis.
 OrthogPolyApprox (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &basis)
 Constructor.
 OrthogPolyApprox (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &basis, ordinal_type sz)
 Constructor with supplied size sz.
 OrthogPolyApprox (const OrthogPolyApprox &x)
 Copy constructor.
 ~OrthogPolyApprox ()
 Destructor.
OrthogPolyApproxoperator= (const OrthogPolyApprox &x)
 Assignment operator (deep copy).
void init (const value_type &v)
 Intialize coefficients to value.
Teuchos::RCP< const Stokhos::OrthogPolyBasis<
ordinal_type, value_type > > 
basis () const
 Return basis.
void reset (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &new_basis)
 Reset to a new basis.
ordinal_type size () const
 Return size.
value_type * coeff ()
 Return coefficient array.
const value_type * coeff () const
 Return coefficient array.
value_type & operator[] (ordinal_type i)
 Array access.
const value_type & operator[] (ordinal_type i) const
 Array access.
value_type & term (ordinal_type dimension, ordinal_type order)
 Get coefficient term for given dimension and order.
const value_type & term (ordinal_type dimension, ordinal_type order) const
 Get coefficient term for given dimension and order.
value_type evaluate (const Teuchos::Array< value_type > &point) const
 Evaluate polynomial approximation at a point.
value_type evaluate (const Teuchos::Array< value_type > &point, const Teuchos::Array< value_type > &basis_vals) const
 Evaluate polynomial approximation at a point with supplied basis values.
value_type mean () const
 Compute mean of expansion.
value_type standard_deviation () const
 Compute standard deviation of expansion.
std::ostream & print (std::ostream &os) const
 Print approximation in basis.

Protected Attributes

Teuchos::RCP< const Stokhos::OrthogPolyBasis<
ordinal_type, value_type > > 
basis_
 Basis expansion is relative to.
Teuchos::Array< value_type > coeff_
 OrthogPolyApprox coefficients.


Detailed Description

template<typename ordinal_type, typename value_type>
class Stokhos::OrthogPolyApprox< ordinal_type, value_type >

Class to store coefficients of a projection onto an orthogonal polynomial basis.


Constructor & Destructor Documentation

template<typename ordinal_type, typename value_type>
Stokhos::OrthogPolyApprox< ordinal_type, value_type >::OrthogPolyApprox (  ) 

Constructor with no basis.

Use with care! Sets size to 1 to store constant term

template<typename ordinal_type, typename value_type>
Stokhos::OrthogPolyApprox< ordinal_type, value_type >::OrthogPolyApprox ( const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &  basis,
ordinal_type  sz 
)

Constructor with supplied size sz.

Normally sz should equal the basis size, however this is not enforced since other situations can arise, e.g., using a size of 1 for a constant expansion.


Member Function Documentation

template<typename ordinal_type, typename value_type>
void Stokhos::OrthogPolyApprox< ordinal_type, value_type >::reset ( const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &  new_basis  ) 

Reset to a new basis.

This resizes array to fit new basis. Coefficients are preserved.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:25:04 2010 for Stokhos by  doxygen 1.4.7