Class tensor3 (o2scl)¶
-
template<class data_t = double, class vec_t = std::vector<data_t>, class vec_size_t = std::vector<size_t>>
class tensor3 : public o2scl::tensor<double, std::vector<double>, std::vector<size_t>>¶ Rank 3 tensor.
Method to check for valid object
-
inline void is_valid() const¶
Check that the o2scl::tensor3 object is valid.
Specialized get and set functions
-
inline const data_t &get(size_t ix1, size_t ix2, size_t ix3) const¶
Get the element indexed by
(ix1,ix2,ix3)
-
inline void set(size_t ix1, size_t ix2, size_t ix3, data_t val)¶
Set the element indexed by
(ix1,ix2,ix3) to value
val
.
-
template<class size_vec_t>
inline void set(const size_vec_t &index, data_t val)¶ Set the element indexed by
index
to valueval
.(We have to explicitly provide this version since the set() function is overloaded in this child of tensor.)
-
inline void is_valid() const¶