Struct InitTransducerDp

Source
pub struct InitTransducerDp<M, A>
where M: Monoid, A: Transducer,
{ /* private fields */ }

Implementations§

Source§

impl<M, A> InitTransducerDp<M, A>
where M: Monoid, A: Transducer,

Source

pub fn new(fst: A, init: M::T) -> Self

Examples found in repository?
crates/competitive/src/data_structure/transducer.rs (line 38)
33    fn dp<M>(self, init: M::T) -> InitTransducerDp<M, Self>
34    where
35        Self: Sized,
36        M: Monoid,
37    {
38        InitTransducerDp::new(self, init)
39    }
Source

pub fn with_factory<F>(self, factory: F) -> Transducerdp<M, A, F::Container>
where F: ContainerFactory, F::Container: Container<Key = A::State, Value = M::T>,

Source

pub fn with_hashmap(self) -> Transducerdp<M, A, HashMap<A::State, M::T>>
where A::State: Eq + Hash,

Source

pub fn with_vecmap<F>( self, key_to_index: F, ) -> Transducerdp<M, A, VecMap<false, A::State, M::T, F>>
where F: Fn(&A::State) -> usize + Clone,

Source

pub fn with_fixed_vecmap<F>( self, key_to_index: F, len: usize, ) -> Transducerdp<M, A, VecMap<true, A::State, M::T, F>>
where F: Fn(&A::State) -> usize + Clone,

Trait Implementations§

Source§

impl<M, A> Clone for InitTransducerDp<M, A>
where M: Monoid + Clone, A: Transducer + Clone, M::T: Clone,

Source§

fn clone(&self) -> InitTransducerDp<M, A>

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<M, A> Debug for InitTransducerDp<M, A>
where M: Monoid + Debug, A: Transducer + Debug, M::T: Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<M, A> Freeze for InitTransducerDp<M, A>
where A: Freeze, <M as Magma>::T: Freeze,

§

impl<M, A> RefUnwindSafe for InitTransducerDp<M, A>
where A: RefUnwindSafe, <M as Magma>::T: RefUnwindSafe,

§

impl<M, A> Send for InitTransducerDp<M, A>
where A: Send, <M as Magma>::T: Send,

§

impl<M, A> Sync for InitTransducerDp<M, A>
where A: Sync, <M as Magma>::T: Sync,

§

impl<M, A> Unpin for InitTransducerDp<M, A>
where A: Unpin, <M as Magma>::T: Unpin,

§

impl<M, A> UnwindSafe for InitTransducerDp<M, A>
where A: UnwindSafe, <M as Magma>::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.