[][src]Struct analytic::partition::ordered_interval_partitions::OrderedIntervalPartitions

pub struct OrderedIntervalPartitions<E: Integer + Copy> { /* fields omitted */ }

Methods

impl<E: Integer + Copy> OrderedIntervalPartitions<E>[src]

impl<E: Integer + Copy + Hash> OrderedIntervalPartitions<E>[src]

pub fn get_partition_containing(
    &self,
    subinterval: &ContiguousIntegerSet<E>
) -> Option<(usize, ContiguousIntegerSet<E>)>
[src]

if there is a partition containing the subinterval, returns a tuple (partition_index, partition)

Trait Implementations

impl<E: Integer + Copy> Refineable<OrderedIntervalPartitions<E>> for OrderedIntervalPartitions<E>[src]

fn get_common_refinement(
    &self,
    other: &OrderedIntervalPartitions<E>
) -> OrderedIntervalPartitions<E>
[src]

Example

use analytic::partition::ordered_interval_partitions::OrderedIntervalPartitions;
use analytic::set::traits::Refineable;
use analytic::set::ordered_integer_set::ContiguousIntegerSet;
let p1 = OrderedIntervalPartitions::from_slice(&[[-1, 4], [8, 10]]);
let p2 = OrderedIntervalPartitions::from_slice(&[[3, 7]]);
assert_eq!(p1.get_common_refinement(&p2).into_vec(), [[-1, 2], [3, 4], [5, 7], [8, 10]]
                                              .iter()
                                              .map(|[a, b]| ContiguousIntegerSet::new(*a, *b))
                                              .collect::<Vec<ContiguousIntegerSet<i32>>>());

Auto Trait Implementations

impl<E> Unpin for OrderedIntervalPartitions<E> where
    E: Unpin

impl<E> Sync for OrderedIntervalPartitions<E> where
    E: Sync

impl<E> Send for OrderedIntervalPartitions<E> where
    E: Send

impl<E> UnwindSafe for OrderedIntervalPartitions<E> where
    E: UnwindSafe

impl<E> RefUnwindSafe for OrderedIntervalPartitions<E> where
    E: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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