\brief check if this tensor has same id as other.
| 210 | } |
| 211 | /// \brief check if this tensor has same id as other. |
| 212 | bool sameas(const tensor<T> &other) const { |
| 213 | return identifier() == other.identifier(); |
| 214 | } |
| 215 | /// \brief Return copy of the tensor, cast to a specified type. |
| 216 | template <typename newT> tensor<newT> asType() { |
| 217 | // if (typeid(T) == typeid(newT)) |