/**
    Checks if an interval contains another interval.

    # Example

    ```
    use advanced_collections::interval::Interval;
    fn main() {
       let a = Interval::closed(3,7);
       let b = Interval::closed(4,6);
       assert!(a.contains_interval(&b));
    }
    ```
    */
Checks if an interval contains another interval.
Checks if an interval contains another interval .
pub fn contains_interval(&self, other: &Self) -> bool {
        let (l, u) = match self.bounds() {
            None => return other.is_empty(),
            Some(a) => a
        };
        let (ol, ou) = match other.bounds() {
            None => return true,
            Some(a) => a
        };
        l <= ol && u >= ou
    }
pub fn contains_interval ( & self , other : & Self ) -> bool { let ( l , u ) = match self . bounds ( ) { None => return other . is_empty ( ) , Some ( a ) => a } ; let ( ol , ou ) = match other . bounds ( ) { None => return true , Some ( a ) => a } ; l <= ol && u >= ou }
Checks if an interval contains another interval.
Checks if an interval contains another interval .
&self
other
&Self
example
```
use advanced_collections::interval::Interval;
fn main() {
let a = Interval::closed(3,7);
let b = Interval::closed(4,6);
assert!(a.contains_interval(&b));
}
```
` ` ` use advanced_collections :: interval :: Interval ; fn main () { let a = Interval :: closed ( 3 7 ) ; let b = Interval :: closed ( 4 6 ) ; assert! ( a . contains_interval ( &b )) ; } ` ` `