pub struct DegreeRange(/* private fields */);
Expand description

An inclusive range of degrees.

Implementations§

Source§

impl DegreeRange

Source

pub fn new(start: Degree, end: Degree) -> DegreeRange

Source

pub fn start(&self) -> Degree

Source

pub fn end(&self) -> Degree

Source

pub fn contains(&self, degree: Degree) -> bool

Source

pub fn is_constant(&self) -> bool

Returns true if the upper bound is at most constant.

Source

pub fn is_linear(&self) -> bool

Returns true if the upper bound is at most linear.

Source

pub fn is_quadratic(&self) -> bool

Returns true if the upper bound is at most quadratic.

Source

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.

Source

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.

Source

pub fn iter_opt<'a, T: IntoIterator<Item = Option<&'a DegreeRange>>>( ranges: T, ) -> Option<DegreeRange>

Source

pub fn add(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn infix_sub(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn mul(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn pow(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn div(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn int_div(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn modulo(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn shift_left(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn shift_right(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn lesser(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn greater(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn lesser_eq(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn greater_eq(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn equal(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn not_equal(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn bit_or(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn bit_and(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn bit_xor(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn bool_or(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn bool_and(&self, other: &DegreeRange) -> DegreeRange

Source

pub fn prefix_sub(&self) -> DegreeRange

Source

pub fn complement(&self) -> DegreeRange

Source

pub fn bool_not(&self) -> DegreeRange

Trait Implementations§

Source§

impl Clone for DegreeRange

Source§

fn clone(&self) -> DegreeRange

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DegreeRange

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<Degree> for DegreeRange

Source§

fn from(degree: Degree) -> DegreeRange

Converts to this type from the input type.
Source§

impl Hash for DegreeRange

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DegreeRange

Source§

fn eq(&self, other: &DegreeRange) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for DegreeRange

Source§

impl StructuralPartialEq for DegreeRange

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V