[−][src]Struct math::partition::ordered_interval_partitions::OrderedIntervalPartitions
Implementations
impl<E: Integer + Copy> OrderedIntervalPartitions<E>
[src]
pub fn from_vec(
partitions: Vec<ContiguousIntegerSet<E>>
) -> OrderedIntervalPartitions<E>
[src]
partitions: Vec<ContiguousIntegerSet<E>>
) -> OrderedIntervalPartitions<E>
pub fn from_vec_with_trusted_order(
partitions: Vec<ContiguousIntegerSet<E>>
) -> OrderedIntervalPartitions<E>
[src]
partitions: Vec<ContiguousIntegerSet<E>>
) -> OrderedIntervalPartitions<E>
pub fn from_slice(slice: &[[E; 2]]) -> OrderedIntervalPartitions<E>
[src]
pub fn num_partitions_overlapped_by(
&self,
other: &OrderedIntervalPartitions<E>
) -> usize
[src]
&self,
other: &OrderedIntervalPartitions<E>
) -> usize
returns the number of partitions that intersect with the other
's
partitions
pub fn num_partitions(&self) -> usize
[src]
pub fn get_partitions_by_ref(&self) -> &Vec<ContiguousIntegerSet<E>>
[src]
pub fn into_vec(self) -> Vec<ContiguousIntegerSet<E>>
[src]
impl<E: Integer + Copy + ToPrimitive> OrderedIntervalPartitions<E>
[src]
pub fn to_ordered_integer_set(&self) -> OrderedIntegerSet<E>
[src]
pub fn into_ordered_integer_set(self) -> OrderedIntegerSet<E>
[src]
impl<E: Integer + Copy + Hash> OrderedIntervalPartitions<E>
[src]
pub fn get_partition_containing(
&self,
subinterval: &ContiguousIntegerSet<E>
) -> Option<(usize, ContiguousIntegerSet<E>)>
[src]
&self,
subinterval: &ContiguousIntegerSet<E>
) -> Option<(usize, ContiguousIntegerSet<E>)>
if there is a partition containing the subinterval, returns a tuple
(partition_index, partition)
Trait Implementations
impl<E: Clone + Integer + Copy> Clone for OrderedIntervalPartitions<E>
[src]
pub fn clone(&self) -> OrderedIntervalPartitions<E>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<E: Debug + Integer + Copy> Debug for OrderedIntervalPartitions<E>
[src]
impl<E: PartialEq + Integer + Copy> PartialEq<OrderedIntervalPartitions<E>> for OrderedIntervalPartitions<E>
[src]
pub fn eq(&self, other: &OrderedIntervalPartitions<E>) -> bool
[src]
pub fn ne(&self, other: &OrderedIntervalPartitions<E>) -> bool
[src]
impl<E: Integer + Copy> Refineable<OrderedIntervalPartitions<E>> for OrderedIntervalPartitions<E>
[src]
pub fn get_common_refinement(
&self,
other: &OrderedIntervalPartitions<E>
) -> OrderedIntervalPartitions<E>
[src]
&self,
other: &OrderedIntervalPartitions<E>
) -> OrderedIntervalPartitions<E>
Example
use math::{ partition::ordered_interval_partitions::OrderedIntervalPartitions, set::{ contiguous_integer_set::ContiguousIntegerSet, traits::Refineable, }, }; 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>>>() );
impl<E: Integer + Copy> StructuralPartialEq for OrderedIntervalPartitions<E>
[src]
impl<E: Integer + Copy + Hash> SubsetIndexable<ContiguousIntegerSet<E>, ContiguousIntegerSet<E>> for OrderedIntervalPartitions<E>
[src]
pub fn get_set_containing(
&self,
subset: &ContiguousIntegerSet<E>
) -> Option<ContiguousIntegerSet<E>>
[src]
&self,
subset: &ContiguousIntegerSet<E>
) -> Option<ContiguousIntegerSet<E>>
Auto Trait Implementations
impl<E> RefUnwindSafe for OrderedIntervalPartitions<E> where
E: RefUnwindSafe,
E: RefUnwindSafe,
impl<E> Send for OrderedIntervalPartitions<E> where
E: Send,
E: Send,
impl<E> Sync for OrderedIntervalPartitions<E> where
E: Sync,
E: Sync,
impl<E> Unpin for OrderedIntervalPartitions<E> where
E: Unpin,
E: Unpin,
impl<E> UnwindSafe for OrderedIntervalPartitions<E> where
E: UnwindSafe,
E: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,