[]Enum tract_tensorflow::prelude::TDim

pub enum TDim {
    Sym(char),
    Val(i32),
    Add(Vec<TDim>),
    Mul(i32Box<TDim>),
    Div(Box<TDim>, u32),
}

Variants

Sym(char)
Val(i32)
Add(Vec<TDim>)
Mul(i32Box<TDim>)
Div(Box<TDim>, u32)

Implementations

impl TDim

pub fn is_one(&self) -> bool

pub fn s() -> TDim

The special value S, for streaming.

pub fn stream() -> TDim

The special value S, for streaming.

pub fn as_const(&self) -> Option<i32>

Try to convert the value to an integer, if it does not contains S.

pub fn is_stream(&self) -> bool

pub fn to_integer(&self) -> Result<i32, TractError>

pub fn eval(&self, s: i32) -> Option<i32>

pub fn reduce(self) -> TDim

pub fn simplify(self) -> TDim

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

pub fn slope(&self) -> (i32, u32)

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 ArrayDatum for 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<u32>, 

type Output = TDim

The resulting type after applying the / operator.

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

impl Eq 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<TDim> for Tensor

impl From<i32> for TDim

impl From<i64> for TDim

impl From<isize> for TDim

impl From<usize> for TDim

impl FromIterator<TDim> for ShapeFactoid[src]

fn from_iter<I>(iter: I) -> ShapeFactoid where
    I: IntoIterator<Item = TDim>, 
[src]

Converts an iterator over usize into a closed shape.

impl FromStr for TDim

type Err = ParseIntError

The associated error which can be returned from parsing.

impl Hash for TDim

impl IntoExp<GenericFactoid<TDim>> for TDim[src]

impl<'_> IntoExp<GenericFactoid<TDim>> for &'_ TDim[src]

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

type Output = TDim

The resulting type after applying the * operator.

impl MulAssign<i32> for TDim

impl Neg for TDim

type Output = TDim

The resulting type after applying the - operator.

impl Ord for TDim

impl Output for TDim[src]

impl PartialEq<TDim> for TDim

impl PartialOrd<TDim> for TDim

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

type Output = TDim

The resulting type after applying the % operator.

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

impl SloppyHash 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 Sum<TDim> for TDim

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

type Error = TractError

The type returned in the event of a conversion error.

impl Zero for TDim

Auto Trait Implementations

impl RefUnwindSafe for TDim

impl Send for TDim

impl Sync for TDim

impl Unpin for TDim

impl UnwindSafe for TDim

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, E> IntoExp<T> for E where
    E: 'static + TExp<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: 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.