10 #ifndef STOKHOS_PRODUCT_CONTAINER_HPP
11 #define STOKHOS_PRODUCT_CONTAINER_HPP
28 template <
typename coeff_type>
136 bool myGID(
int i)
const;
139 std::ostream&
print(std::ostream& os)
const;
151 template <
typename coeff_type>
154 return vec.
print(os);
162 #endif // STOKHOS_PRODUCT_VECTOR_HPP
Teuchos::RCP< const Epetra_BlockMap > map() const
Return container map.
void setCoeffPtr(ordinal_type i, const Teuchos::RCP< coeff_type > &c)
Set coefficient i to c.
bool myGID(int i) const
Return whether global index i resides on this processor.
ProductContainer & operator=(const ProductContainer &)
Assignment.
void init(const value_type &val)
Initialize coefficients.
coeff_type & operator[](ordinal_type i)
Array access.
int ordinal_type
Typename of ordinals.
Cloner for Epetra_Vector coefficients.
Stokhos::ProductContainerTraits< coeff_type > traits_type
Typename of traits.
double value_type
Typename of values.
Base traits definition for ProductContainer.
Teuchos::RCP< const Epetra_BlockMap > map_
Container map.
const Teuchos::Array< Teuchos::RCP< coeff_type > > & getCoefficients() const
Return array of coefficients.
void reset(const Teuchos::RCP< const Epetra_BlockMap > &map)
Resize to new map map.
std::ostream & operator<<(std::ostream &os, const ProductContainer< coeff_type > &vec)
virtual ~ProductContainer()
Destructor.
Teuchos::Array< Teuchos::RCP< coeff_type > > coeff_
Array of polynomial coefficients.
Teuchos::RCP< coeff_type > getCoeffPtr(ordinal_type i)
Return ref-count pointer to coefficient i.
A product (in the mathematical sense) container class whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
traits_type::ordinal_type ordinal_type
Typename of ordinals.
ProductContainer()
Default constructor.
std::ostream & print(std::ostream &os) const
Print polynomial.
traits_type::value_type value_type
Typename of values.
void reserve(ordinal_type sz)
Reserve space for a size sz container.
ordinal_type size() const
Return size.
void resize(const Teuchos::RCP< const Epetra_BlockMap > &map)
Resize to map map.