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 as_i64(&self) -> Option<i64>
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 more§impl<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 more§impl DimLike for TDim
impl DimLike for TDim
§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 more§impl<'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 more§impl<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 more§impl Ord for TDim
impl Ord for TDim
§impl PartialOrd<TDim> for TDim
impl PartialOrd<TDim> for TDim
§fn partial_cmp(&self, other: &TDim) -> Option<Ordering>
fn partial_cmp(&self, other: &TDim) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§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 more§impl<'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 more§impl<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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn 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
.source§fn 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
.source§fn 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.source§fn 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.