Struct gad::graph::Value[][src]

pub struct Value<D> { /* fields omitted */ }

A value tracked in a graph.

Implementations

impl<D> Value<D>[src]

pub fn constant(data: D) -> Self[src]

Create a constant valid in any graph-based algebra. This is safe because constants are not tracked in the graph.

pub fn data(&self) -> &D[src]

The data of a computation node.

pub fn id(&self) -> Option<GradientId<D>>[src]

The id of a computation node.

pub fn input(&self) -> Option<Id>[src]

The internal, untyped id of a computation node (used to track dependencies).

Trait Implementations

impl<D, E, Dims> AnalyticAlgebra<Value<D>> for Graph<Config1<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + AnalyticAlgebra<D> + ArithAlgebra<D> + ConstArithAlgebra<D, i16> + LinkedAlgebra<Value<D>, D>,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D, E, Dims> AnalyticAlgebra<Value<D>> for Graph<ConfigN<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + AnalyticAlgebra<D> + ArithAlgebra<D> + ConstArithAlgebra<D, i16> + LinkedAlgebra<Value<D>, D>,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D, E, Dims> ArithAlgebra<Value<D>> for Graph<Config1<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + ArithAlgebra<D> + LinkedAlgebra<Value<D>, D>,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D, E, Dims> ArithAlgebra<Value<D>> for Graph<ConfigN<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + ArithAlgebra<D> + LinkedAlgebra<Value<D>, D>,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D, E, T, Dims> ArrayAlgebra<Value<D>> for Graph<Config1<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + CoreAlgebra<T, Value = T> + LinkedAlgebra<Value<D>, D> + LinkedAlgebra<Value<T>, T> + ArrayAlgebra<D, Scalar = T, Dims = Dims>,
    Dims: PartialEq + Clone + Copy + Debug + Default + 'static + Send + Sync,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    T: Number
[src]

type Dims = Dims

type Scalar = Value<T>

impl<D, E, T, Dims> ArrayAlgebra<Value<D>> for Graph<ConfigN<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + CoreAlgebra<T, Value = T> + LinkedAlgebra<Value<D>, D> + LinkedAlgebra<Value<T>, T> + ArrayAlgebra<D, Scalar = T, Dims = Dims>,
    Dims: PartialEq + Clone + Copy + Debug + Default + 'static + Send + Sync,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    T: Number
[src]

type Dims = Dims

type Scalar = Value<T>

impl<D, E, T, Dims> ArrayCompareAlgebra<Value<D>> for Graph<Config1<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + CoreAlgebra<T, Value = T> + CompareAlgebra<D> + ArrayCompareAlgebra<D> + ArrayAlgebra<D, Dims = Dims> + ArithAlgebra<D> + ArrayAlgebra<D, Scalar = T, Dims = Dims> + LinkedAlgebra<Value<D>, D> + LinkedAlgebra<Value<T>, T>,
    T: Number,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Default + Copy + Clone + 'static + Send + Sync
[src]

impl<D, E, T, Dims> ArrayCompareAlgebra<Value<D>> for Graph<ConfigN<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + CoreAlgebra<T, Value = T> + CompareAlgebra<D> + ArrayCompareAlgebra<D> + ArrayAlgebra<D, Dims = Dims> + ArithAlgebra<D> + ArrayAlgebra<D, Scalar = T, Dims = Dims> + LinkedAlgebra<Value<D>, D> + LinkedAlgebra<Value<T>, T>,
    T: Number,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Default + Copy + Clone + 'static + Send + Sync
[src]

impl<D: Clone> Clone for Value<D>[src]

impl<D, E, Dims> CompareAlgebra<Value<D>> for Graph<Config1<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + CompareAlgebra<D> + LinkedAlgebra<Value<D>, D>,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D, E, Dims> CompareAlgebra<Value<D>> for Graph<ConfigN<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + CompareAlgebra<D> + LinkedAlgebra<Value<D>, D>,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D, E, Dims, C> ConstArithAlgebra<Value<D>, C> for Graph<Config1<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + ArithAlgebra<D> + ConstArithAlgebra<D, C> + LinkedAlgebra<Value<D>, D>,
    C: Sub<C, Output = C> + One + Clone + 'static + Send + Sync,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D, E, Dims, C> ConstArithAlgebra<Value<D>, C> for Graph<ConfigN<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + ArithAlgebra<D> + ConstArithAlgebra<D, C> + LinkedAlgebra<Value<D>, D>,
    C: Sub<C, Output = C> + One + Clone + 'static + Send + Sync,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D: Debug> Debug for Value<D>[src]

impl<D: Default> Default for Value<D>[src]

impl<T: 'static> GradientReader<GradientId<T>, Value<T>> for GenericGradientMapN[src]

impl<T: 'static> GradientStore<GradientId<T>, Value<T>> for GenericGradientMapN[src]

impl<A> HasDims for Value<A> where
    A: HasDims
[src]

type Dims = A::Dims

impl<A> HasGradientId for Value<A>[src]

type GradientId = GradientId<A>

impl<D, A> LinkedAlgebra<Value<D>, D> for A where
    A: CoreAlgebra<D, Value = D>, 
[src]

Ignore the link when evaluating pure arrays.

impl<D, E, Dims> MatrixAlgebra<Value<D>> for Graph<Config1<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + LinkedAlgebra<Value<D>, D> + MatrixAlgebra<D>,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D, E, Dims> MatrixAlgebra<Value<D>> for Graph<ConfigN<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + LinkedAlgebra<Value<D>, D> + MatrixAlgebra<D>,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D: PartialEq> PartialEq<Value<D>> for Value<D>[src]

impl<D> StructuralPartialEq for Value<D>[src]

Auto Trait Implementations

impl<D> RefUnwindSafe for Value<D> where
    D: RefUnwindSafe

impl<D> Send for Value<D> where
    D: Send

impl<D> Sync for Value<D> where
    D: Sync

impl<D> Unpin for Value<D> where
    D: Unpin

impl<D> UnwindSafe for Value<D> where
    D: UnwindSafe

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D, A> LinkedAlgebra<Value<D>, D> for A where
    A: CoreAlgebra<D, Value = D>, 
[src]

impl<D, A> LinkedAlgebra<Value<D>, D> for A where
    A: CoreAlgebra<D, Value = D>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.