Skip to main content

EsperSolver

Struct EsperSolver 

Source
pub struct EsperSolver<R, Input, Class, FC, FF>
where R: Field<Additive: Invertible, Multiplicative: Invertible>, Class: Eq + Hash, FC: Fn(&Input) -> Class, FF: Fn(&Input) -> Vec<R::T>,
{ class: FC, feature: FF, data: HashMap<Class, Option<Vec<R::T>>>, _marker: PhantomData<fn() -> (R::T, Input, Class)>, }

Fields§

§class: FC§feature: FF§data: HashMap<Class, Option<Vec<R::T>>>§_marker: PhantomData<fn() -> (R::T, Input, Class)>

Implementations§

Source§

impl<R, Input, Class, FC, FF> EsperSolver<R, Input, Class, FC, FF>
where R: Field<Additive: Invertible, Multiplicative: Invertible>, Class: Eq + Hash, FC: Fn(&Input) -> Class, FF: Fn(&Input) -> Vec<R::T>,

Source

pub fn solve(&self, input: Input) -> R::T

Trait Implementations§

Source§

impl<R, Input: Clone, Class, FC, FF> Clone for EsperSolver<R, Input, Class, FC, FF>
where R: Field<Additive: Invertible, Multiplicative: Invertible> + Clone, Class: Eq + Hash + Clone, FC: Fn(&Input) -> Class + Clone, FF: Fn(&Input) -> Vec<R::T> + Clone, R::T: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<R, Input: Debug, Class, FC, FF> Debug for EsperSolver<R, Input, Class, FC, FF>
where R: Field<Additive: Invertible, Multiplicative: Invertible> + Debug, Class: Eq + Hash + Debug, FC: Fn(&Input) -> Class + Debug, FF: Fn(&Input) -> Vec<R::T> + Debug, R::T: Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<R, Input, Class, FC, FF> Freeze for EsperSolver<R, Input, Class, FC, FF>
where FC: Freeze, FF: Freeze, HashMap<Class, Option<Vec<<R as SemiRing>::T>>>: Freeze, PhantomData<fn() -> (<R as SemiRing>::T, Input, Class)>: Freeze,

§

impl<R, Input, Class, FC, FF> RefUnwindSafe for EsperSolver<R, Input, Class, FC, FF>
where FC: RefUnwindSafe, FF: RefUnwindSafe, HashMap<Class, Option<Vec<<R as SemiRing>::T>>>: RefUnwindSafe, PhantomData<fn() -> (<R as SemiRing>::T, Input, Class)>: RefUnwindSafe,

§

impl<R, Input, Class, FC, FF> Send for EsperSolver<R, Input, Class, FC, FF>
where FC: Send, FF: Send, HashMap<Class, Option<Vec<<R as SemiRing>::T>>>: Send, PhantomData<fn() -> (<R as SemiRing>::T, Input, Class)>: Send,

§

impl<R, Input, Class, FC, FF> Sync for EsperSolver<R, Input, Class, FC, FF>
where FC: Sync, FF: Sync, HashMap<Class, Option<Vec<<R as SemiRing>::T>>>: Sync, PhantomData<fn() -> (<R as SemiRing>::T, Input, Class)>: Sync,

§

impl<R, Input, Class, FC, FF> Unpin for EsperSolver<R, Input, Class, FC, FF>
where FC: Unpin, FF: Unpin, HashMap<Class, Option<Vec<<R as SemiRing>::T>>>: Unpin, PhantomData<fn() -> (<R as SemiRing>::T, Input, Class)>: Unpin,

§

impl<R, Input, Class, FC, FF> UnsafeUnpin for EsperSolver<R, Input, Class, FC, FF>
where FC: UnsafeUnpin, FF: UnsafeUnpin, HashMap<Class, Option<Vec<<R as SemiRing>::T>>>: UnsafeUnpin, PhantomData<fn() -> (<R as SemiRing>::T, Input, Class)>: UnsafeUnpin,

§

impl<R, Input, Class, FC, FF> UnwindSafe for EsperSolver<R, Input, Class, FC, FF>
where FC: UnwindSafe, FF: UnwindSafe, HashMap<Class, Option<Vec<<R as SemiRing>::T>>>: UnwindSafe, PhantomData<fn() -> (<R as SemiRing>::T, Input, Class)>: 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> ToArrayVecScalar for T

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.