Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_Dense3Tensor.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_DENSE3TENSOR_HPP
11 #define STOKHOS_DENSE3TENSOR_HPP
12 
13 #include <ostream>
14 
15 #include "Teuchos_Array.hpp"
16 
17 namespace Stokhos {
18 
22  template <typename ordinal_type, typename value_type>
23  class Dense3Tensor {
24  public:
25 
28 
30  ~Dense3Tensor();
31 
33  ordinal_type size() const;
34 
37  ordinal_type k) const;
38 
41 
44 
47  value_type& c) const;
48 
50  void print(std::ostream& os) const;
51 
52  private:
53 
54  // Prohibit copying
55  Dense3Tensor(const Dense3Tensor&);
56 
57  // Prohibit Assignment
59 
60  protected:
61 
64 
67 
68  }; // class Dense3Tensor
69 
70  template <typename ordinal_type, typename value_type>
71  std::ostream&
72  operator << (std::ostream& os,
74  Cijk.print(os);
75  return os;
76  }
77 
78 } // namespace Stokhos
79 
80 // Include template definitions
82 
83 #endif // STOKHOS_DENSE3TENSOR_HPP
void print(std::ostream &os) const
Print tensor.
ordinal_type size() const
Return size.
Dense3Tensor & operator=(const Dense3Tensor &b)
ordinal_type num_values(ordinal_type k) const
Return number of non-zero&#39;s in Cijk for a given k.
std::ostream & operator<<(std::ostream &os, const ProductContainer< coeff_type > &vec)
Teuchos::Array< value_type > Cijk_values
Dense tensor array.
const value_type & operator()(ordinal_type i, ordinal_type j, ordinal_type k) const
Get value (i,j,k)
ordinal_type l
Size of each dimension.
Data structure storing a dense 3-tensor C(i,j,k).
Dense3Tensor(ordinal_type sz)
Constructor.
void value(ordinal_type k, ordinal_type l, ordinal_type &i, ordinal_type &j, value_type &c) const
Get value (i,j,k) using sparse access.