pub fn modify(&mut self, mut l: usize, mut r: usize, f: &T::F) {
        l += self.app.len();
        r += self.app.len();
        if l < r {
            self.push_to(l);
        }
        self.push_to(r);
        let (mut l0, mut r0) = (1, 1);
        while l <= r {
            if l & 1 == 1 {
                self.apply(l, f);
                l0 = l0.max(l);
                l += 1;
            }
            if r & 1 == 0 {
                self.apply(r, f);
                r0 = r0.max(r);
                r -= 1;
            }
            l >>= 1;
            r >>= 1;
        }
        self.pull_from(l0);
        self.pull_from(r0);
    }
/// Applies the endomorphism f to all entries from l to r, inclusive.
/// If l == r, the updates are eager. Otherwise, they are lazy.
///
/// # Panics
///
/// Panics if r >= size. Note that l > r is valid, meaning an empty range.
Applies the endomorphism f to all entries from l to r, inclusive.
If l == r, the updates are eager. Otherwise, they are lazy.
Applies the endomorphism f to all entries from l to r inclusive . If l == r the updates are eager . Otherwise they are lazy .
pub fn modify(&mut self, mut l: usize, mut r: usize, f: &T::F) {
        l += self.app.len();
        r += self.app.len();
        if l < r {
            self.push_to(l);
        }
        self.push_to(r);
        let (mut l0, mut r0) = (1, 1);
        while l <= r {
            if l & 1 == 1 {
                self.apply(l, f);
                l0 = l0.max(l);
                l += 1;
            }
            if r & 1 == 0 {
                self.apply(r, f);
                r0 = r0.max(r);
                r -= 1;
            }
            l >>= 1;
            r >>= 1;
        }
        self.pull_from(l0);
        self.pull_from(r0);
    }
pub fn modify ( & mut self , mut l : usize , mut r : usize , f : & T :: F ) { l += self . app . len ( ) ; r += self . app . len ( ) ; if l < r { self . push_to ( l ) ; } self . push_to ( r ) ; let ( mut l0 , mut r0 ) = ( 1 , 1 ) ; while l <= r { if l & 1 == 1 { self . apply ( l , f ) ; l0 = l0 . max ( l ) ; l += 1 ; } if r & 1 == 0 { self . apply ( r , f ) ; r0 = r0 . max ( r ) ; r -= 1 ; } l >>= 1 ; r >>= 1 ; } self . pull_from ( l0 ) ; self . pull_from ( r0 ) ; }
Applies the endomorphism f to all entries from l to r, inclusive.
Applies the endomorphism f to all entries from l to r inclusive .
&mut self
l
usize
r
usize
f
&T::F
panics
Panics if r >= size. Note that l > r is valid, meaning an empty range.
Panics if r > = size . Note that l > r is valid meaning an empty range .