Enum tract_pulse::internal::TDim
pub enum TDim {
Sym(Symbol),
Val(i64),
Add(Vec<TDim, Global>),
Mul(Vec<TDim, Global>),
MulInt(i64, Box<TDim, Global>),
Div(Box<TDim, Global>, u64),
}
Variants
Sym(Symbol)
Val(i64)
Add(Vec<TDim, Global>)
Mul(Vec<TDim, Global>)
MulInt(i64, Box<TDim, Global>)
Div(Box<TDim, Global>, u64)
Implementations
impl TDim
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>
pub fn compatible_with(&self, _other: &TDim) -> bool
pub fn compatible_with(&self, _other: &TDim) -> bool
Check if a dim is ‘compatible with’ another, meaning that the current dim is a “sub” dimension within or equal to the _other dim
Trait Implementations
impl<'a> AddAssign<&'a TDim> for TDim
impl<'a> AddAssign<&'a TDim> for TDim
fn add_assign(&mut self, rhs: &'a TDim)
fn add_assign(&mut self, rhs: &'a TDim)
Performs the
+=
operation. Read moreimpl<I> AddAssign<I> for TDimwhere
I: Into<TDim>,
impl<I> AddAssign<I> for TDimwhere
I: Into<TDim>,
fn add_assign(&mut self, rhs: I)
fn add_assign(&mut self, rhs: I)
Performs the
+=
operation. Read moreimpl DimLike for TDim
impl DimLike for TDim
impl<I> Div<I> for TDimwhere
I: AsPrimitive<u64> + PrimInt,
impl<I> Div<I> for TDimwhere
I: AsPrimitive<u64> + PrimInt,
impl<I> DivAssign<I> for TDimwhere
I: AsPrimitive<u64> + PrimInt,
impl<I> DivAssign<I> for TDimwhere
I: AsPrimitive<u64> + PrimInt,
fn div_assign(&mut self, rhs: I)
fn div_assign(&mut self, rhs: I)
Performs the
/=
operation. Read moreimpl<'a> MulAssign<&'a TDim> for TDim
impl<'a> MulAssign<&'a TDim> for TDim
fn mul_assign(&mut self, rhs: &'a TDim)
fn mul_assign(&mut self, rhs: &'a TDim)
Performs the
*=
operation. Read moreimpl<I> MulAssign<I> for TDimwhere
I: Into<TDim>,
impl<I> MulAssign<I> for TDimwhere
I: Into<TDim>,
fn mul_assign(&mut self, rhs: I)
fn mul_assign(&mut self, rhs: I)
Performs the
*=
operation. Read moreimpl Ord for TDim
impl Ord for TDim
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialOrd<TDim> for TDim
impl PartialOrd<TDim> for TDim
impl<I> Rem<I> for TDimwhere
I: AsPrimitive<u64> + PrimInt,
impl<I> Rem<I> for TDimwhere
I: AsPrimitive<u64> + PrimInt,
impl<I> RemAssign<I> for TDimwhere
I: AsPrimitive<u64> + PrimInt,
impl<I> RemAssign<I> for TDimwhere
I: AsPrimitive<u64> + PrimInt,
fn rem_assign(&mut self, rhs: I)
fn rem_assign(&mut self, rhs: I)
Performs the
%=
operation. Read moreimpl<'a> SubAssign<&'a TDim> for TDim
impl<'a> SubAssign<&'a TDim> for TDim
fn sub_assign(&mut self, rhs: &'a TDim)
fn sub_assign(&mut self, rhs: &'a TDim)
Performs the
-=
operation. Read moreimpl<I> SubAssign<I> for TDimwhere
I: Into<TDim>,
impl<I> SubAssign<I> for TDimwhere
I: Into<TDim>,
fn sub_assign(&mut self, rhs: I)
fn sub_assign(&mut self, rhs: I)
Performs the
-=
operation. Read moreimpl Eq for TDim
impl StructuralEq for TDim
impl StructuralPartialEq 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more