Skip to main content

Table

Struct Table 

Source
pub struct Table<T>(/* private fields */);

Implementations§

Source§

impl<D: Dimension> Table<Array<f64, D>>

Source

pub fn dense(weights: Array<f64, D>) -> Self

Source

pub fn zeros(dim: D) -> Self

Trait Implementations§

Source§

impl<T: Clone> Clone for Table<T>

Source§

fn clone(&self) -> Table<T>

Returns a duplicate 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<T: Debug> Debug for Table<T>

Source§

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

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

impl<S: Borrow<usize>> Differentiable<(S,)> for Table<Array1<f64>>

Source§

type Jacobian = Tile<Dim<[usize; 1]>, usize>

Source§

fn grad(&self, (s): (S,)) -> Self::Jacobian

Source§

fn grad_log(&self, _: (S,)) -> Self::Jacobian

Source§

impl<S: Borrow<usize>, A: Borrow<usize>> Differentiable<(S, A)> for Table<Array2<f64>>

Source§

type Jacobian = Tile<Dim<[usize; 2]>, (usize, usize)>

Source§

fn grad(&self, (s, a): (S, A)) -> Self::Jacobian

Source§

fn grad_log(&self, _: (S, A)) -> Self::Jacobian

Source§

impl Enumerable<()> for Table<Array1<f64>>

Source§

fn len(&self, _: ()) -> usize

Source§

fn evaluate_index( &self, args: Args, index: usize, ) -> <Self::Output as Index<usize>>::Output

Source§

fn find_min( &self, args: Args, ) -> (usize, <Self::Output as Index<usize>>::Output)
where Self::Output: IntoIterator<Item = <Self::Output as Index<usize>>::Output>, <Self::Output as Index<usize>>::Output: PartialOrd + Sized,

Source§

fn find_max( &self, args: Args, ) -> (usize, <Self::Output as Index<usize>>::Output)
where Self::Output: IntoIterator<Item = <Self::Output as Index<usize>>::Output>, <Self::Output as Index<usize>>::Output: PartialOrd + Sized,

Source§

fn expected_value<I: IntoIterator<Item = f64>>(&self, args: Args, ps: I) -> f64
where Self::Output: IntoIterator<Item = <Self::Output as Index<usize>>::Output>, <Self::Output as Index<usize>>::Output: Mul<f64, Output = f64>,

Source§

impl<S: Borrow<usize>> Enumerable<(S,)> for Table<Array2<f64>>

Source§

fn len(&self, _: (S,)) -> usize

Source§

fn evaluate_index( &self, args: Args, index: usize, ) -> <Self::Output as Index<usize>>::Output

Source§

fn find_min( &self, args: Args, ) -> (usize, <Self::Output as Index<usize>>::Output)
where Self::Output: IntoIterator<Item = <Self::Output as Index<usize>>::Output>, <Self::Output as Index<usize>>::Output: PartialOrd + Sized,

Source§

fn find_max( &self, args: Args, ) -> (usize, <Self::Output as Index<usize>>::Output)
where Self::Output: IntoIterator<Item = <Self::Output as Index<usize>>::Output>, <Self::Output as Index<usize>>::Output: PartialOrd + Sized,

Source§

fn expected_value<I: IntoIterator<Item = f64>>(&self, args: Args, ps: I) -> f64
where Self::Output: IntoIterator<Item = <Self::Output as Index<usize>>::Output>, <Self::Output as Index<usize>>::Output: Mul<f64, Output = f64>,

Source§

impl<D: Dimension> From<ArrayBase<OwnedRepr<f64>, D>> for Table<Array<f64, D>>

Source§

fn from(w: Array<f64, D>) -> Table<Array<f64, D>>

Converts to this type from the input type.
Source§

impl Function<()> for Table<Array1<f64>>

Source§

type Output = Vec<f64>

Source§

fn evaluate(&self, _: ()) -> Vec<f64>

Source§

impl<S: Borrow<usize>> Function<(S,)> for Table<Array1<f64>>

Source§

type Output = f64

Source§

fn evaluate(&self, (s): (S,)) -> f64

Source§

impl<S: Borrow<usize>> Function<(S,)> for Table<Array2<f64>>

Source§

type Output = Vec<f64>

Source§

fn evaluate(&self, (s): (S,)) -> Vec<f64>

Source§

impl<S: Borrow<usize>, A: Borrow<usize>> Function<(S, A)> for Table<Array2<f64>>

Source§

type Output = f64

Source§

fn evaluate(&self, (s, a): (S, A)) -> f64

Source§

impl<S: Borrow<usize>, A: Borrow<usize>> Handler<StateActionUpdate<S, A>> for Table<Array2<f64>>

Source§

type Response = Response

Source§

type Error = Error

Source§

fn handle( &mut self, msg: StateActionUpdate<S, A>, ) -> Result<Self::Response, Self::Error>

Source§

fn handle_unchecked(&mut self, msg: M) -> Self::Response

Source§

impl<S: Borrow<usize>> Handler<StateUpdate<S>> for Table<Array1<f64>>

Source§

type Response = Response

Source§

type Error = Error

Source§

fn handle(&mut self, msg: StateUpdate<S>) -> Result<Self::Response, Self::Error>

Source§

fn handle_unchecked(&mut self, msg: M) -> Self::Response

Source§

impl<S: Borrow<usize>> Handler<StateUpdate<S, Vec<f64>>> for Table<Array2<f64>>

Source§

type Response = Response

Source§

type Error = Error

Source§

fn handle( &mut self, msg: StateUpdate<S, Vec<f64>>, ) -> Result<Self::Response, Self::Error>

Source§

fn handle_unchecked(&mut self, msg: M) -> Self::Response

Source§

impl<T, I> Index<I> for Table<T>
where T: Index<I>,

Source§

type Output = <T as Index<I>>::Output

The returned type after indexing.
Source§

fn index(&self, index: I) -> &T::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Parameterised for Table<Array1<f64>>

Source§

fn weights_view(&self) -> WeightsView<'_>

Return a read-only view of the weights.
Source§

fn weights_view_mut(&mut self) -> WeightsViewMut<'_>

Return a mutable view of the weights.
Source§

fn weights(&self) -> Weights

Return an owned copy of the weights.
Source§

fn weights_dim(&self) -> (usize, usize)

Return the dimensions of the weight matrix.
Source§

fn n_weights(&self) -> usize

Source§

impl Parameterised for Table<Array2<f64>>

Source§

fn weights_view(&self) -> WeightsView<'_>

Return a read-only view of the weights.
Source§

fn weights_view_mut(&mut self) -> WeightsViewMut<'_>

Return a mutable view of the weights.
Source§

fn weights(&self) -> Weights

Return an owned copy of the weights.
Source§

fn weights_dim(&self) -> (usize, usize)

Return the dimensions of the weight matrix.
Source§

fn n_weights(&self) -> usize

Auto Trait Implementations§

§

impl<T> Freeze for Table<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Table<T>
where T: RefUnwindSafe,

§

impl<T> Send for Table<T>
where T: Send,

§

impl<T> Sync for Table<T>
where T: Sync,

§

impl<T> Unpin for Table<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Table<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Table<T>
where T: UnwindSafe,

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> 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> 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<M> Message for M