pub struct InitTransducerDp<M, A>where
M: Monoid,
A: Transducer,{
fst: A,
init: M::T,
}Fields§
§fst: A§init: M::TImplementations§
Source§impl<M, A> InitTransducerDp<M, A>where
M: Monoid,
A: Transducer,
impl<M, A> InitTransducerDp<M, A>where
M: Monoid,
A: Transducer,
Sourcepub fn with_factory<F>(self, factory: F) -> Transducerdp<M, A, F::Container>
pub fn with_factory<F>(self, factory: F) -> Transducerdp<M, A, F::Container>
Examples found in repository?
crates/competitive/src/data_structure/transducer.rs (line 112)
108 pub fn with_hashmap(self) -> Transducerdp<M, A, HashMap<A::State, M::T>>
109 where
110 A: Transducer<State: Eq + Hash>,
111 {
112 self.with_factory(HashMapFactory::default())
113 }
114 pub fn with_vecmap<F>(
115 self,
116 key_to_index: F,
117 ) -> Transducerdp<M, A, VecMap<false, A::State, M::T, F>>
118 where
119 F: Fn(&A::State) -> usize + Clone,
120 {
121 self.with_factory(VecMapFactory::new(key_to_index))
122 }
123 pub fn with_fixed_vecmap<F>(
124 self,
125 key_to_index: F,
126 len: usize,
127 ) -> Transducerdp<M, A, VecMap<true, A::State, M::T, F>>
128 where
129 F: Fn(&A::State) -> usize + Clone,
130 {
131 self.with_factory(FixedVecMapFactory::new(key_to_index, len))
132 }pub fn with_hashmap(self) -> Transducerdp<M, A, HashMap<A::State, M::T>>
pub fn with_vecmap<F>( self, key_to_index: F, ) -> Transducerdp<M, A, VecMap<false, A::State, M::T, F>>
pub fn with_fixed_vecmap<F>( self, key_to_index: F, len: usize, ) -> Transducerdp<M, A, VecMap<true, A::State, M::T, F>>
Trait Implementations§
Source§impl<M, A> Clone for InitTransducerDp<M, A>
impl<M, A> Clone for InitTransducerDp<M, A>
Source§fn clone(&self) -> InitTransducerDp<M, A>
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<M, A> Freeze for InitTransducerDp<M, A>
impl<M, A> RefUnwindSafe for InitTransducerDp<M, A>
impl<M, A> Send for InitTransducerDp<M, A>
impl<M, A> Sync for InitTransducerDp<M, A>
impl<M, A> Unpin for InitTransducerDp<M, A>
impl<M, A> UnwindSafe for InitTransducerDp<M, A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more