Struct intervals_rs::IntervalSeq [−][src]
pub struct IntervalSeq<T: Debug + Display + Clone + Hash + Eq + Ord + PartialEq + PartialOrd> { /* fields omitted */ }
Expand description
A structure that represents an interval sequence (a sequence of multiple Intervals).
Implementations
impl<T: Debug + Display + Clone + Hash + Eq + Ord + PartialEq + PartialOrd> IntervalSeq<T>
[src]
impl<T: Debug + Display + Clone + Hash + Eq + Ord + PartialEq + PartialOrd> IntervalSeq<T>
[src]pub fn append(&mut self, value: &Interval<T>)
[src]
pub fn append(&mut self, value: &Interval<T>)
[src]Add an interval element to this interval sequence.
- value: an interval
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
[src]Return whether the interval sequence are empty.
return: true if the interval sequence are empty
pub fn new(values: &[Interval<T>]) -> Self
[src]
pub fn extent(&self) -> Interval<T>
[src]
pub fn extent(&self) -> Interval<T>
[src]Return the smallest interval that encompasses all the element intervals.
- return: the smallest interval that encompasses all the elemental intervals.
- panic: if none of the elements are present
pub fn gap(&self) -> Self
[src]
pub fn gap(&self) -> Self
[src]In the sorted intervals, return the intervals that are between adjacent intervals as the interval sequence.
If the number of intervals is less than two, an empty sequence of intervals is returned. If the intervals overlap or touch each other, the intervals are not included in the result element. If all the intervals overlap, an empty interval sequence is returned.
- return: gap interval sequence
pub fn intersections(&self) -> Self
[src]
pub fn intersections(&self) -> Self
[src]Return the sorted intervals where adjacent intervals overlap each other as an interval sequence.
If the number of intervals is less than two, an empty sequence of intervals is returned. If the intervals do not overlap or are tangent to each other, the intervals are not included in the result element. If all the intervals do not overlap, an empty interval sequence is returned.
- return: common interval sequence
Auto Trait Implementations
impl<T> RefUnwindSafe for IntervalSeq<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for IntervalSeq<T> where
T: Send,
T: Send,
impl<T> Sync for IntervalSeq<T> where
T: Sync,
T: Sync,
impl<T> Unpin for IntervalSeq<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for IntervalSeq<T> where
T: UnwindSafe,
T: UnwindSafe,