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§
sourcetype Combine: TensorInstance
type Combine: TensorInstance
The return type of a math operation
sourcetype DenseCombine: TensorInstance
type DenseCombine: TensorInstance
The return type of a math operation with a result expected to be dense
Required Methods§
sourcefn add_const(self, other: Number) -> TCResult<Self::DenseCombine>
fn add_const(self, other: Number) -> TCResult<Self::DenseCombine>
Add a constant to this tensor
sourcefn sub_const(self, other: Number) -> TCResult<Self::DenseCombine>
fn sub_const(self, other: Number) -> TCResult<Self::DenseCombine>
Subtract other
from self
.