SeekByRaccCond

Struct SeekByRaccCond 

Source
pub struct SeekByRaccCond<Spec, L, F>
where L: LazyMapMonoid,
{ acc: L::Agg, f: F, _marker: PhantomData<fn() -> (Spec, L)>, }

Fields§

§acc: L::Agg§f: F§_marker: PhantomData<fn() -> (Spec, L)>

Implementations§

Source§

impl<Spec, L, F> SeekByRaccCond<Spec, L, F>
where L: LazyMapMonoid, F: FnMut(&L::Agg) -> bool,

Source

pub fn new(f: F) -> Self

Examples found in repository?
crates/competitive/src/data_structure/treap.rs (line 451)
445    pub fn find_by_racc_cond<F>(&mut self, f: F) -> Option<BstNodeId<TreapSpec<M, L>>>
446    where
447        F: FnMut(&L::Agg) -> bool,
448    {
449        let split = Split::new(
450            &mut self.root,
451            SeekByRaccCond::<TreapSpec<M, L>, L, F>::new(f),
452            true,
453        );
454        let node = split.left()?.rightmost()?;
455        self.node_id_manager.registerd_node_id(node)
456    }

Trait Implementations§

Source§

impl<Spec, L, F> BstSeeker for SeekByRaccCond<Spec, L, F>
where Spec: BstSpec<Data: BstDataAccess<LazyMap, Value = LazyMapElement<L>>>, L: LazyMapMonoid, F: FnMut(&L::Agg) -> bool,

Source§

type Spec = Spec

Source§

fn bst_seek(&mut self, node: BstImmutRef<'_, Self::Spec>) -> Ordering

Auto Trait Implementations§

§

impl<Spec, L, F> Freeze for SeekByRaccCond<Spec, L, F>
where <L as LazyMapMonoid>::Agg: Freeze, F: Freeze,

§

impl<Spec, L, F> RefUnwindSafe for SeekByRaccCond<Spec, L, F>

§

impl<Spec, L, F> Send for SeekByRaccCond<Spec, L, F>
where <L as LazyMapMonoid>::Agg: Send, F: Send,

§

impl<Spec, L, F> Sync for SeekByRaccCond<Spec, L, F>
where <L as LazyMapMonoid>::Agg: Sync, F: Sync,

§

impl<Spec, L, F> Unpin for SeekByRaccCond<Spec, L, F>
where <L as LazyMapMonoid>::Agg: Unpin, F: Unpin,

§

impl<Spec, L, F> UnwindSafe for SeekByRaccCond<Spec, L, F>

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> 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, 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.