Tensor
A C++ expression template library for computations on N dimensional tensors
|
Expression class for calculating the subtraction of two tensors. More...
#include <tensor_subtraction.hpp>
Public Types | |
using | traits = T1 |
using | dim_container = typename traits::dim_container |
using | size_type = typename traits::size_type |
using | data_type = typename traits::data_type |
Public Member Functions | |
TensorSubtraction (TensorExpression< E1, T1 > const &x, TensorExpression< E2, T2 > const &y) | |
Sets the expressions for subtraction and checks that they have the same ranks and dimension. More... | |
const dim_container & | dim_sizes () const |
Gets the sizes of the all the dimensions of the expression. More... | |
const size_type | size () const |
Returns the size of the expression. More... | |
const size_type | rank () const |
Returns the size of the expression. More... | |
data_type | operator[] (size_type i) const |
Adds two elements (one from each Tensor) from the tensor expression data. More... | |
Expression class for calculating the subtraction of two tensors.
E1 | The first expression for subtraction |
E2 | The second expression for subtraction |
T1 | The traits of the first expression |
T2 | The traits if the second expression |
using ftl::TensorSubtraction< E1, E2, T1, T2 >::data_type = typename traits::data_type |
using ftl::TensorSubtraction< E1, E2, T1, T2 >::dim_container = typename traits::dim_container |
using ftl::TensorSubtraction< E1, E2, T1, T2 >::size_type = typename traits::size_type |
using ftl::TensorSubtraction< E1, E2, T1, T2 >::traits = T1 |
ftl::TensorSubtraction< E1, E2, T1, T2 >::TensorSubtraction | ( | TensorExpression< E1, T1 > const & | x, |
TensorExpression< E2, T2 > const & | y | ||
) |
Sets the expressions for subtraction and checks that they have the same ranks and dimension.
[in] | x | The first expression for subtraction. |
[in] | y | The second expression for subtraction |
|
inline |
Gets the sizes of the all the dimensions of the expression.
|
inline |
Adds two elements (one from each Tensor) from the tensor expression data.
[in] | i | The element in the expression which must be fetched. |
|
inline |
Returns the size of the expression.
|
inline |
Returns the size of the expression.