pub struct LiChaoTree<T> { /* private fields */ }
Expand description
直線や線分を追加して、事前指定した点での最大値(/最小値)を得る。
Implementations§
Source§impl<T: Elem> LiChaoTree<T>
impl<T: Elem> LiChaoTree<T>
Sourcepub fn new(xs: Vec<T>, mode: Mode) -> Result<Self, &'static str>
pub fn new(xs: Vec<T>, mode: Mode) -> Result<Self, &'static str>
query
で使用する点列xs
と最大値クエリ/最小値クエリを指定してLiChaoTree
を構築する。
Sourcepub fn add_segment(&mut self, segment: Linear<T>, range: RangeInclusive<T>)
pub fn add_segment(&mut self, segment: Linear<T>, range: RangeInclusive<T>)
線分を追加する。
Auto Trait Implementations§
impl<T> Freeze for LiChaoTree<T>
impl<T> RefUnwindSafe for LiChaoTree<T>where
T: RefUnwindSafe,
impl<T> Send for LiChaoTree<T>where
T: Send,
impl<T> Sync for LiChaoTree<T>where
T: Sync,
impl<T> Unpin for LiChaoTree<T>where
T: Unpin,
impl<T> UnwindSafe for LiChaoTree<T>where
T: UnwindSafe,
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