[−][src]Struct tract_core::analyser::types::ShapeFact
Partial information about a shape.
A basic example of a shape fact is shapefact![1, 2]
, which corresponds to
the shape [1, 2]
in Arc_
in facts to denote unknown
dimensions (e.g. shapefact![1, 2, _]
corresponds to any shape [1, 2, k]
with k
a non-negative integer). We can also use ..
at the end of a fact
to only specify its first dimensions, so shapefact![1, 2; ..]
matches any
shape that starts with [1, 2]
(e.g. [1, 2, i]
or [1, 2, i, j]
), while
shapefact![..]
matches any shape.
Methods
impl ShapeFact
[src]
pub fn open(dims: TVec<DimFact>) -> ShapeFact
[src]
Constructs an open shape fact.
pub fn is_open(&self) -> bool
[src]
pub fn closed(dims: TVec<DimFact>) -> ShapeFact
[src]
Constructs a closed shape fact.
pub fn rank(&self) -> IntFact
[src]
pub fn dims(&self) -> impl Iterator<Item = DimFact>
[src]
pub fn stream_info(&self) -> TractResult<Option<StreamInfo>>
[src]
pub fn as_concrete_finite(&self) -> TractResult<Option<TVec<usize>>>
[src]
Trait Implementations
impl Fact for ShapeFact
[src]
type Concrete = TVec<TDim>
fn concretize(self: &ShapeFact) -> Option<TVec<TDim>>
[src]
Tries to transform the fact into a Vec<usize>
, or returns None
.
fn unify(&self, other: &Self) -> TractResult<Self>
[src]
Tries to unify the fact with another fact of the same type.
fn is_concrete(&self) -> bool
[src]
Returns whether the value is fully determined.
impl Output for ShapeFact
[src]
fn into_wrapped(source: Self) -> Wrapped
[src]
fn from_wrapped(wrapped: Wrapped) -> TractResult<ShapeFact>
[src]
fn wrap(self) -> Wrapped
[src]
Wraps self in the Wrapped type.
impl IntoExp<ShapeFact> for ShapeFact
[src]
impl IntoExp<ShapeFact> for ShapeProxy
[src]
impl<'a> IntoExp<ShapeFact> for &'a ShapeProxy
[src]
impl IntoExp<ShapeFact> for TVec<TDim>
[src]
impl PartialEq<ShapeFact> for ShapeFact
[src]
impl Default for ShapeFact
[src]
impl Clone for ShapeFact
[src]
fn clone(&self) -> ShapeFact
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<D: ToDim, I: IntoIterator<Item = D>> From<I> for ShapeFact
[src]
impl Debug for ShapeFact
[src]
impl FromIterator<TDim> for ShapeFact
[src]
fn from_iter<I: IntoIterator<Item = TDim>>(iter: I) -> ShapeFact
[src]
Converts an iterator over usize into a closed shape.
impl FromIterator<usize> for ShapeFact
[src]
fn from_iter<I: IntoIterator<Item = usize>>(iter: I) -> ShapeFact
[src]
Converts an iterator over usize into a closed shape.
Auto Trait Implementations
Blanket Implementations
impl<T, E> IntoExp<T> for E where
E: 'static + TExp<T>,
[src]
E: 'static + TExp<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,