pub struct DegreeRange(/* private fields */);Expand description
An inclusive range of degrees.
Implementations§
Source§impl DegreeRange
impl DegreeRange
pub fn new(start: Degree, end: Degree) -> DegreeRange
pub fn start(&self) -> Degree
pub fn end(&self) -> Degree
pub fn contains(&self, degree: Degree) -> bool
Sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Returns true if the upper bound is at most constant.
Sourcepub fn is_quadratic(&self) -> bool
pub fn is_quadratic(&self) -> bool
Returns true if the upper bound is at most quadratic.
Sourcepub fn inf(&self, other: &DegreeRange) -> DegreeRange
pub fn inf(&self, other: &DegreeRange) -> DegreeRange
Computes the infimum (under inverse inclusion) of self and other.
Note, if the two ranges overlap this will simply be the union of self
and other.
Sourcepub fn iter_inf<'a, T: IntoIterator<Item = &'a DegreeRange>>(
ranges: T,
) -> DegreeRange
pub fn iter_inf<'a, T: IntoIterator<Item = &'a DegreeRange>>( ranges: T, ) -> DegreeRange
Constructs the infimum (under inverse inclusion) of the given degree ranges. Note, if the ranges overlap this will simply be the union of all the ranges.
§Panics
This method will panic if the iterator is empty.
pub fn iter_opt<'a, T: IntoIterator<Item = Option<&'a DegreeRange>>>( ranges: T, ) -> Option<DegreeRange>
pub fn add(&self, other: &DegreeRange) -> DegreeRange
pub fn infix_sub(&self, other: &DegreeRange) -> DegreeRange
pub fn mul(&self, other: &DegreeRange) -> DegreeRange
pub fn pow(&self, other: &DegreeRange) -> DegreeRange
pub fn div(&self, other: &DegreeRange) -> DegreeRange
pub fn int_div(&self, other: &DegreeRange) -> DegreeRange
pub fn modulo(&self, other: &DegreeRange) -> DegreeRange
pub fn shift_left(&self, other: &DegreeRange) -> DegreeRange
pub fn shift_right(&self, other: &DegreeRange) -> DegreeRange
pub fn lesser(&self, other: &DegreeRange) -> DegreeRange
pub fn greater(&self, other: &DegreeRange) -> DegreeRange
pub fn lesser_eq(&self, other: &DegreeRange) -> DegreeRange
pub fn greater_eq(&self, other: &DegreeRange) -> DegreeRange
pub fn equal(&self, other: &DegreeRange) -> DegreeRange
pub fn not_equal(&self, other: &DegreeRange) -> DegreeRange
pub fn bit_or(&self, other: &DegreeRange) -> DegreeRange
pub fn bit_and(&self, other: &DegreeRange) -> DegreeRange
pub fn bit_xor(&self, other: &DegreeRange) -> DegreeRange
pub fn bool_or(&self, other: &DegreeRange) -> DegreeRange
pub fn bool_and(&self, other: &DegreeRange) -> DegreeRange
pub fn prefix_sub(&self) -> DegreeRange
pub fn complement(&self) -> DegreeRange
pub fn bool_not(&self) -> DegreeRange
Trait Implementations§
Source§impl Clone for DegreeRange
impl Clone for DegreeRange
Source§fn clone(&self) -> DegreeRange
fn clone(&self) -> DegreeRange
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 moreSource§impl Debug for DegreeRange
impl Debug for DegreeRange
Source§impl From<Degree> for DegreeRange
impl From<Degree> for DegreeRange
Source§fn from(degree: Degree) -> DegreeRange
fn from(degree: Degree) -> DegreeRange
Converts to this type from the input type.
Source§impl Hash for DegreeRange
impl Hash for DegreeRange
Source§impl PartialEq for DegreeRange
impl PartialEq for DegreeRange
impl Eq for DegreeRange
impl StructuralPartialEq for DegreeRange
Auto Trait Implementations§
impl Freeze for DegreeRange
impl RefUnwindSafe for DegreeRange
impl Send for DegreeRange
impl Sync for DegreeRange
impl Unpin for DegreeRange
impl UnwindSafe for DegreeRange
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