[−][src]Struct lfa::VectorFunction
Fields
weights: Weights
Approximation weights.
Methods
impl VectorFunction
[src]
pub fn new(weights: Weights) -> Self
[src]
Construct a new approximation with specified weights
.
pub fn zeros(n_features: usize, n_outputs: usize) -> Self
[src]
Construct a new approximation with zeroed weights.
Trait Implementations
impl Parameterised for VectorFunction
[src]
fn weights(&self) -> Weights
[src]
fn weights_dim(&self) -> [usize; 2]
[src]
fn weights_view(&self) -> WeightsView
[src]
fn weights_view_mut(&mut self) -> WeightsViewMut
[src]
impl Approximator for VectorFunction
[src]
type Output = Vec<f64>
The type of value being approximated.
fn n_outputs(&self) -> usize
[src]
fn evaluate(&self, f: &Features) -> Result<Self::Output>
[src]
fn update<O>(&mut self, opt: &mut O, f: &Features, es: Vec<f64>) -> Result<()> where
O: Optimiser,
[src]
O: Optimiser,
impl PartialEq<VectorFunction> for VectorFunction
[src]
fn eq(&self, other: &VectorFunction) -> bool
[src]
fn ne(&self, other: &VectorFunction) -> bool
[src]
impl Clone for VectorFunction
[src]
fn clone(&self) -> VectorFunction
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for VectorFunction
[src]
Auto Trait Implementations
impl Send for VectorFunction
impl Unpin for VectorFunction
impl Sync for VectorFunction
impl UnwindSafe for VectorFunction
impl RefUnwindSafe for VectorFunction
Blanket Implementations
impl<T> VectorApproximator for T where
T: Approximator<Output = Vec<f64>>,
[src]
T: Approximator<Output = Vec<f64>>,
fn evaluate_index(&self, features: &Features, index: usize) -> Result<f64>
[src]
Evaluate the index
-th output value.
fn update_index<O: Optimiser>(
&mut self,
opt: &mut O,
features: &Features,
index: usize,
error: f64
) -> Result<()>
[src]
&mut self,
opt: &mut O,
features: &Features,
index: usize,
error: f64
) -> Result<()>
Update the index
-th output value.
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<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, 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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,