Struct FrozenSimpleState

Source
pub struct FrozenSimpleState<F, O, M, P>
where F: Fact + Clone + 'static, O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static, M: Borrow<Graph<F, O>>, P: Borrow<SimplePlan<F, O, M>> + Clone,
{ pub inputs: HashMap<usize, Tensor>, pub resolved_symbols: SymbolValues, pub scenario: Option<usize>, pub tensors: HashMap<String, Tensor>, pub states: Vec<Option<Box<dyn FrozenOpState>>>, pub values: Vec<Option<SmallVec<[Tensor; 4]>>>, /* private fields */ }

Fields§

§inputs: HashMap<usize, Tensor>§resolved_symbols: SymbolValues§scenario: Option<usize>§tensors: HashMap<String, Tensor>§states: Vec<Option<Box<dyn FrozenOpState>>>§values: Vec<Option<SmallVec<[Tensor; 4]>>>

Implementations§

Source§

impl<F, O, M, P> FrozenSimpleState<F, O, M, P>
where F: Fact + Clone + 'static, O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static, M: Borrow<Graph<F, O>>, P: Borrow<SimplePlan<F, O, M>> + Clone,

Source

pub fn unfreeze(&self) -> SimpleState<F, O, M, P>

Trait Implementations§

Source§

impl<F, O, M, P> Clone for FrozenSimpleState<F, O, M, P>
where F: Clone + Fact + 'static, O: Clone + Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + 'static, M: Clone + Borrow<Graph<F, O>>, P: Clone + Borrow<SimplePlan<F, O, M>>,

Source§

fn clone(&self) -> FrozenSimpleState<F, O, M, P>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F, O, M, P> Debug for FrozenSimpleState<F, O, M, P>
where F: Debug + Fact + Clone + 'static, O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static, M: Debug + Borrow<Graph<F, O>>, P: Debug + Borrow<SimplePlan<F, O, M>> + Clone,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl FrozenOpState for FrozenSimpleState<TypedFact, Box<dyn TypedOp>, Graph<TypedFact, Box<dyn TypedOp>>, Arc<SimplePlan<TypedFact, Box<dyn TypedOp>, Graph<TypedFact, Box<dyn TypedOp>>>>>

Source§

fn unfreeze(&self) -> Box<dyn OpState>

Auto Trait Implementations§

§

impl<F, O, M, P> Freeze for FrozenSimpleState<F, O, M, P>
where P: Freeze,

§

impl<F, O, M, P> !RefUnwindSafe for FrozenSimpleState<F, O, M, P>

§

impl<F, O, M, P> Send for FrozenSimpleState<F, O, M, P>
where P: Send, M: Send, O: Send,

§

impl<F, O, M, P> !Sync for FrozenSimpleState<F, O, M, P>

§

impl<F, O, M, P> Unpin for FrozenSimpleState<F, O, M, P>
where P: Unpin, M: Unpin, F: Unpin, O: Unpin,

§

impl<F, O, M, P> !UnwindSafe for FrozenSimpleState<F, O, M, P>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> CloneAny for T
where T: Any + Clone,