Trait tc_tensor::TensorMathConst
source · [−]pub trait TensorMathConst {
type Combine: TensorInstance;
type DenseCombine: TensorInstance;
fn add_const(self, other: Number) -> TCResult<Self::DenseCombine>;
fn div_const(self, other: Number) -> TCResult<Self::Combine>;
fn log_const(self, base: Number) -> TCResult<Self::Combine>;
fn mul_const(self, other: Number) -> TCResult<Self::Combine>;
fn pow_const(self, other: Number) -> TCResult<Self::Combine>;
fn sub_const(self, other: Number) -> TCResult<Self::DenseCombine>;
}
Expand description
Tensor
constant math operations
Required Associated Types
type Combine: TensorInstance
type Combine: TensorInstance
The return type of a math operation
The return type of a math operation with a result expected to be dense
Required Methods
fn add_const(self, other: Number) -> TCResult<Self::DenseCombine>
fn add_const(self, other: Number) -> TCResult<Self::DenseCombine>
Add a constant to this tensor
fn sub_const(self, other: Number) -> TCResult<Self::DenseCombine>
fn sub_const(self, other: Number) -> TCResult<Self::DenseCombine>
Subtract other
from self
.