Skip to main content

Comparison

Trait Comparison 

pub trait Comparison<Rhs = Self> {
    type BoolTensor;

    // Required methods
    fn lt(self, other: Rhs) -> Self::BoolTensor;
    fn le(self, other: Rhs) -> Self::BoolTensor;
    fn gt(self, other: Rhs) -> Self::BoolTensor;
    fn ge(self, other: Rhs) -> Self::BoolTensor;
    fn eq(self, other: Rhs) -> Self::BoolTensor;
    fn ne(self, other: Rhs) -> Self::BoolTensor;
}
Expand description

Element-wise comparison against Rhs, producing a boolean-valued tensor.

Required Associated Types§

type BoolTensor

The boolean-valued tensor type produced by these comparisons.

Required Methods§

fn lt(self, other: Rhs) -> Self::BoolTensor

Element-wise less-than.

fn le(self, other: Rhs) -> Self::BoolTensor

Element-wise less-than-or-equal.

fn gt(self, other: Rhs) -> Self::BoolTensor

Element-wise greater-than.

fn ge(self, other: Rhs) -> Self::BoolTensor

Element-wise greater-than-or-equal.

fn eq(self, other: Rhs) -> Self::BoolTensor

Element-wise equality.

fn ne(self, other: Rhs) -> Self::BoolTensor

Element-wise inequality.

Implementors§