pub struct MexSet {
pub ranges: BTreeSet<(isize, isize)>,
}Expand description
集合とそのmexを管理する
Fields§
§ranges: BTreeSet<(isize, isize)>Implementations§
Source§impl MexSet
impl MexSet
Sourcepub fn insert_range<R: RangeBounds<isize>>(&mut self, range: R) -> bool
pub fn insert_range<R: RangeBounds<isize>>(&mut self, range: R) -> bool
集合に区間を追加する
- 計算量: O(log(n)) (amotized)
Sourcepub fn delete_range<R: RangeBounds<isize>>(&mut self, range: R) -> bool
pub fn delete_range<R: RangeBounds<isize>>(&mut self, range: R) -> bool
集合から区間を削除する
- 計算量: O(log(n)) (amotized)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MexSet
impl RefUnwindSafe for MexSet
impl Send for MexSet
impl Sync for MexSet
impl Unpin for MexSet
impl UnwindSafe for MexSet
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more