Enum orkhon::prelude::ops::nn::tract_data::internal::TDim[]

pub enum TDim {
    Sym(Symbol),
    Val(i64),
    Add(Vec<TDim, Global>),
    Mul(i64Box<TDim, Global>),
    Div(Box<TDim, Global>, u64),
}

Variants

Sym(Symbol)
Val(i64)
Add(Vec<TDim, Global>)
Mul(i64Box<TDim, Global>)
Div(Box<TDim, Global>, u64)

Implementations

impl TDim

pub fn is_one(&self) -> bool

pub fn to_i64(&self) -> Result<i64, Error>

pub fn eval(&self, values: &SymbolValues) -> TDim

pub fn reduce(self) -> TDim

pub fn simplify(self) -> TDim

pub fn div_ceil(self, rhs: u64) -> TDim

pub fn slope(&self, sym: Symbol) -> (i64, u64)

pub fn symbols(&self) -> HashSet<Symbol, RandomState>

Trait Implementations

impl<'a> Add<&'a TDim> for TDim

type Output = TDim

The resulting type after applying the + operator.

impl<I> Add<I> for TDim where
    I: Into<TDim>, 

type Output = TDim

The resulting type after applying the + operator.

impl<'a> AddAssign<&'a TDim> for TDim

impl<I> AddAssign<I> for TDim where
    I: Into<TDim>, 

impl Clone for TDim

impl Datum for TDim

impl Debug for TDim

impl Default for TDim

impl DimLike for TDim

impl Display for TDim

impl<I> Div<I> for TDim where
    I: AsPrimitive<u64>, 

type Output = TDim

The resulting type after applying the / operator.

impl<I> DivAssign<I> for TDim where
    I: AsPrimitive<u64>, 

impl Eq for TDim

impl<'a> From<&'a Symbol> for TDim

impl<'a> From<&'a i32> for TDim

impl<'a> From<&'a i64> for TDim

impl<'a> From<&'a isize> for TDim

impl<'a> From<&'a usize> for TDim

impl From<Symbol> for TDim

impl From<TDim> for Tensor

impl From<i32> for TDim

impl From<i64> for TDim

impl From<isize> for TDim

impl From<usize> for TDim

impl FromStr for TDim

type Err = ParseIntError

The associated error which can be returned from parsing.

impl Hash for TDim

impl<I> Mul<I> for TDim where
    I: AsPrimitive<i64>, 

type Output = TDim

The resulting type after applying the * operator.

impl MulAssign<i64> for TDim

impl Neg for TDim

type Output = TDim

The resulting type after applying the - operator.

impl Ord for TDim

impl PartialEq<TDim> for TDim

impl PartialOrd<TDim> for TDim

impl<I> Rem<I> for TDim where
    I: AsPrimitive<u64>, 

type Output = TDim

The resulting type after applying the % operator.

impl<I> RemAssign<I> for TDim where
    I: AsPrimitive<u64>, 

impl StructuralEq for TDim

impl StructuralPartialEq for TDim

impl<'a> Sub<&'a TDim> for TDim

type Output = TDim

The resulting type after applying the - operator.

impl<I> Sub<I> for TDim where
    I: Into<TDim>, 

type Output = TDim

The resulting type after applying the - operator.

impl<'a> SubAssign<&'a TDim> for TDim

impl<I> SubAssign<I> for TDim where
    I: Into<TDim>, 

impl<'a> Sum<&'a TDim> for TDim

impl Sum<TDim> for TDim

impl<'a> ToDim for &'a TDim

impl<'a> TryFrom<&'a TDim> for usize

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a TDim> for TDim

type Error = Error

The type returned in the event of a conversion error.

impl Zero for TDim

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<I> ToDim for I where
    I: Clone + Into<TDim>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.