pub trait TensorCond<Then, OrElse> {
    type Cond: TensorInstance;

    // Required method
    fn cond(self, then: Then, or_else: OrElse) -> TCResult<Self::Cond>;
}
Expand description

Conditional logic for Tensors

Required Associated Types§

source

type Cond: TensorInstance

The type of Tensor returned by cond

Required Methods§

source

fn cond(self, then: Then, or_else: OrElse) -> TCResult<Self::Cond>

Use this tensor as a condition to select elements from then or or_else.

Implementors§

source§

impl<Txn, FE> TensorCond<DenseView<Txn, FE>, DenseView<Txn, FE>> for DenseView<Txn, FE>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node> + Clone,

§

type Cond = DenseView<Txn, FE>

source§

impl<Txn, FE> TensorCond<Tensor<Txn, FE>, Tensor<Txn, FE>> for Tensor<Txn, FE>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node> + Clone,

§

type Cond = Tensor<Txn, FE>

source§

impl<Txn, FE> TensorCond<SparseView<Txn, FE>, SparseView<Txn, FE>> for SparseView<Txn, FE>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node> + Clone,

§

type Cond = SparseView<Txn, FE>

source§

impl<Txn, FE, Cond, Then, OrElse, T> TensorCond<DenseTensor<Txn, FE, Then>, DenseTensor<Txn, FE, OrElse>> for DenseTensor<Txn, FE, Cond>
where Txn: ThreadSafe, FE: ThreadSafe, Cond: DenseInstance<DType = u8> + Debug, Then: DenseInstance<DType = T> + Debug, OrElse: DenseInstance<DType = T> + Debug, T: CType,

§

type Cond = DenseTensor<Txn, FE, DenseCond<Cond, Then, OrElse>>

source§

impl<Txn, FE, Cond, Then, OrElse, T> TensorCond<SparseTensor<Txn, FE, Then>, SparseTensor<Txn, FE, OrElse>> for SparseTensor<Txn, FE, Cond>
where Txn: ThreadSafe, FE: ThreadSafe, Cond: SparseInstance<DType = u8> + Debug, Then: SparseInstance<DType = T> + Debug, OrElse: SparseInstance<DType = T> + Debug,

§

type Cond = SparseTensor<Txn, FE, SparseCond<Cond, Then, OrElse>>