|
Txeo v0.1
A Developer-Friendly TensorFlow C++ Wrapper
|
A utility class for performing operations on tensors and vectors. More...
#include <TensorOp.h>

Public Member Functions | |
| TensorOp (const TensorOp &)=delete | |
| TensorOp (TensorOp &&)=delete | |
| TensorOp & | operator= (const TensorOp &)=delete |
| TensorOp & | operator= (TensorOp &&)=delete |
| ~TensorOp ()=default | |
Static Public Member Functions | |
| static txeo::Tensor< T > | sum (const txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| Returns the sum of two tensors. | |
| static txeo::Tensor< T > & | sum_by (txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| Sums the left operand with the right operand (in-place) | |
| static txeo::Tensor< T > | sum (const txeo::Tensor< T > &left, const T &right) |
| Element-wise sum of tensor and scalar (out-of-place) | |
| static txeo::Tensor< T > & | sum_by (txeo::Tensor< T > &left, const T &right) |
| In-place element-wise addition of scalar to tensor. | |
| static txeo::Tensor< T > | subtract (const txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| Returns the subtraction of two tensors. | |
| static txeo::Tensor< T > & | subtract_by (txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| Subtracts the left operand by the right operand (in-place) | |
| static txeo::Tensor< T > | subtract (const txeo::Tensor< T > &left, const T &right) |
| Element-wise subtraction of scalar from tensor (out-of-place) | |
| static txeo::Tensor< T > & | subtract_by (txeo::Tensor< T > &left, const T &right) |
| In-place element-wise subtraction of scalar from tensor. | |
| static txeo::Tensor< T > | subtract (const T &left, const txeo::Tensor< T > &right) |
| Element-wise subtraction of tensor from scalar (out-of-place) | |
| static const T & | subtract_by (const T &left, txeo::Tensor< T > &right) |
| In-place element-wise subtraction of tensor from scalar. | |
| static txeo::Tensor< T > | multiply (const txeo::Tensor< T > &left, const T &right) |
| Returns the multiplication of a tensor and a scalar. | |
| static txeo::Tensor< T > & | multiply_by (txeo::Tensor< T > &left, const T &right) |
| Multiplies the tensor by a scalar (in-place) | |
| static txeo::Tensor< T > | divide (const txeo::Tensor< T > &left, const T &right) |
| Element-wise division of tensor by scalar (out-of-place) | |
| static txeo::Tensor< T > & | divide_by (txeo::Tensor< T > &left, const T &right) |
| In-place element-wise division of tensor by scalar. | |
| static txeo::Tensor< T > | divide (const T &left, const txeo::Tensor< T > &right) |
| Element-wise division of scalar by tensor (out-of-place) | |
| static txeo::Tensor< T > & | divide_by (const T &scalar, txeo::Tensor< T > &tensor) |
| In-place element-wise division of scalar by tensor elements. | |
| static txeo::Tensor< T > | hadamard_prod (const txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| Returns the element-wise product (Hadamard Product) of two tensors. | |
| static txeo::Tensor< T > & | hadamard_prod_by (txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| Performs element-wise multiplication of the left operand by the right operand (in-place) | |
| static txeo::Tensor< T > | hadamard_div (const txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| Element-wise Hadamard division (out-of-place) | |
| static txeo::Tensor< T > & | hadamard_div_by (txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| In-place element-wise Hadamard division. | |
| static T | inner (const txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| Computes the inner product of two tensors. | |
| static txeo::Tensor< T > | product_tensors (const txeo::Tensor< T > &left, const txeo::Tensor< T > &right) |
| Computes the matrix product of two second order tensors. | |
| static txeo::Matrix< T > | dot (const txeo::Matrix< T > &left, const txeo::Matrix< T > &right) |
| Computes the matrix product of two matrices. | |
| static txeo::Tensor< T > | dot (const txeo::Matrix< T > &left, const txeo::Vector< T > &right) |
| Computes the matrix product of a matrix and a vector. | |
A utility class for performing operations on tensors and vectors.
This class provides static methods for common tensor and vector operations, such as dot product.
| T | The data type of the tensor/vector elements (e.g., int, double). |
Definition at line 25 of file TensorOp.h.
|
default |
|
static |
Element-wise division of scalar by tensor (out-of-place)
| left | Scalar dividend |
| right | Tensor divisor (shape NxMx...) |
Example Usage:
|
static |
Element-wise division of tensor by scalar (out-of-place)
| left | Dividend tensor |
| right | Scalar divisor |
Example Usage:
|
static |
In-place element-wise division of scalar by tensor elements.
| scalar | Scalar dividend |
| tensor | Tensor divisor (modified with results) |
Example Usage:
|
static |
In-place element-wise division of tensor by scalar.
| left | Tensor to modify (dividend) |
| right | Scalar divisor |
Example Usage:
|
static |
Computes the matrix product of two matrices.
| left | The left matrix (m x n). |
| right | The right matrix (n x p). |
| txeo::TensorOpError |
Example Usage:
|
static |
Computes the matrix product of a matrix and a vector.
| left | The left matrix (m x n). |
| right | The right vector (n). |
| txeo::TensorOpError |
Example Usage:
|
static |
Element-wise Hadamard division (out-of-place)
| left | Dividend tensor (shape NxMx...) |
| right | Divisor tensor (must match left's shape) |
Example Usage:
|
static |
In-place element-wise Hadamard division.
| left | Dividend tensor (modified with results) |
| right | Divisor tensor |
Example Usage:
|
static |
Returns the element-wise product (Hadamard Product) of two tensors.
| left | Left operand |
| right | Right operand |
| TensorOpError | Thrown if shapes mismatch |
Example Usage:
|
static |
Performs element-wise multiplication of the left operand by the right operand (in-place)
| left | Operand to be modified |
| right | Operand to multiply with |
| TensorOpError | Thrown if shapes mismatch |
Example Usage:
|
static |
Computes the inner product of two tensors.
| left | The first tensor. |
| right | The second tensors. |
| txeo::TensorOpError |
Example Usage:
|
static |
Returns the multiplication of a tensor and a scalar.
| left | Tensor operand |
| right | Scalar multiplier |
Example Usage:
|
static |
Multiplies the tensor by a scalar (in-place)
| left | Operand to be modified |
| right | Scalar multiplier |
Example Usage:
|
static |
Computes the matrix product of two second order tensors.
| left | The left tensor (m x n). |
| right | The right tensor (n x p). |
| txeo::TensorOpError |
Example Usage:
|
static |
Element-wise subtraction of tensor from scalar (out-of-place)
| left | Scalar value |
| right | Tensor to subtract |
Example Usage:
|
static |
Element-wise subtraction of scalar from tensor (out-of-place)
| left | Input tensor (shape NxMx...) |
| right | Scalar value to subtract |
Example Usage:
|
static |
Returns the subtraction of two tensors.
| left | Left operand |
| right | Right operand |
| TensorOpError | Thrown if shapes mismatch |
Example Usage:
|
static |
In-place element-wise subtraction of tensor from scalar.
| left | Scalar value (minuend) |
| right | Tensor to modify (subtrahend) |
Example Usage:
|
static |
In-place element-wise subtraction of scalar from tensor.
| left | Tensor to modify |
| right | Scalar to subtract |
Example Usage:
|
static |
Subtracts the left operand by the right operand (in-place)
| left | Operand to be modified |
| right | Operand to subtract |
| TensorOpError | Thrown if shapes mismatch |
Example Usage:
|
static |
Element-wise sum of tensor and scalar (out-of-place)
| left | Input tensor (shape NxMx...) |
| right | Scalar value to add |
Example Usage:
|
static |
Returns the sum of two tensors.
| left | Left operand |
| right | Right operand |
| TensorOpError | Thrown if shapes mismatch |
Example Usage:
|
static |
In-place element-wise addition of scalar to tensor.
| left | Tensor to modify |
| right | Scalar to add |
Example Usage:
|
static |
Sums the left operand with the right operand (in-place)
| left | Operand to be modified |
| right | Operand to add |
| TensorOpError | Thrown if shapes mismatch |
Example Usage: