42#ifndef STOKHOS_PRODUCT_CONTAINER_HPP
43#define STOKHOS_PRODUCT_CONTAINER_HPP
46#include "Teuchos_RCP.hpp"
47#include "Teuchos_Array.hpp"
60 template <
typename coeff_type>
91 const typename traits_type::cloner_type& cloner);
112 void reset(
const Teuchos::RCP<const Epetra_BlockMap>&
map);
118 void reset(
const Teuchos::RCP<const Epetra_BlockMap>&
map,
119 const typename traits_type::cloner_type& cloner);
125 void resize(
const Teuchos::RCP<const Epetra_BlockMap>&
map);
137 Teuchos::RCP<const Epetra_BlockMap>
map()
const;
140 const Teuchos::Array<Teuchos::RCP<coeff_type> >&
144 Teuchos::Array<Teuchos::RCP<coeff_type> >&
148 Teuchos::RCP<coeff_type>
152 Teuchos::RCP<const coeff_type>
168 bool myGID(
int i)
const;
171 std::ostream&
print(std::ostream& os)
const;
176 Teuchos::RCP<const Epetra_BlockMap>
map_;
179 Teuchos::Array< Teuchos::RCP<coeff_type> >
coeff_;
183 template <
typename coeff_type>
186 return vec.
print(os);
Base traits definition for ProductContainer.
A product (in the mathematical sense) container class whose coefficients are vectors,...
ProductContainer()
Default constructor.
traits_type::value_type value_type
Typename of values.
traits_type::ordinal_type ordinal_type
Typename of ordinals.
Teuchos::RCP< const Epetra_BlockMap > map() const
Return container map.
Teuchos::Array< Teuchos::RCP< coeff_type > > coeff_
Array of polynomial coefficients.
void reserve(ordinal_type sz)
Reserve space for a size sz container.
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 & print(std::ostream &os) const
Print polynomial.
Teuchos::RCP< coeff_type > getCoeffPtr(ordinal_type i)
Return ref-count pointer to coefficient i.
void init(const value_type &val)
Initialize coefficients.
virtual ~ProductContainer()
Destructor.
ProductContainer & operator=(const ProductContainer &)
Assignment.
ordinal_type size() const
Return size.
void resize(const Teuchos::RCP< const Epetra_BlockMap > &map)
Resize to map map.
coeff_type & operator[](ordinal_type i)
Array access.
Stokhos::ProductContainerTraits< coeff_type > traits_type
Typename of traits.
Teuchos::RCP< const Epetra_BlockMap > map_
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.
Top-level namespace for Stokhos classes and functions.
std::ostream & operator<<(std::ostream &os, const ProductContainer< coeff_type > &vec)