Struct sprs::stack::DStack [−][src]
A double stack of fixed capacity, growing from the left to the right or conversely.
Used in sparse triangular / sparse vector solves, where it is guaranteed that the two parts of the stack cannot overlap.
Implementations
impl<I> DStack<I> where
I: Clone,
[src]
I: Clone,
pub fn with_capacity(n: usize) -> Self where
I: Default,
[src]
I: Default,
Create a new double stacked suited for containing at most n elements
pub fn capacity(&self) -> usize
[src]
Capacity of the dstack
pub fn is_left_empty(&self) -> bool
[src]
Test whether the left stack is empty
pub fn is_right_empty(&self) -> bool
[src]
Test whether the right stack is empty
pub fn push_left(&mut self, value: I)
[src]
Push a value on the left stack
pub fn push_right(&mut self, value: I)
[src]
Push a value on the right stack
pub fn pop_left(&mut self) -> Option<I>
[src]
Pop a value from the left stack
pub fn pop_right(&mut self) -> Option<I>
[src]
Pop a value from the right stack
pub fn len_right(&self) -> usize
[src]
Number of right elements this double stack contains
pub fn clear_right(&mut self)
[src]
Clear the right stack
pub fn clear_left(&mut self)
[src]
Clear the left stack
pub fn iter_right(&self) -> Iter<'_, I>
[src]
Iterates along the right stack without removing items
pub fn push_left_on_right(&mut self)
[src]
Push the values of the left stack onto the right stack.
pub fn push_right_on_left(&mut self)
[src]
Push the values of the right stack onto the left stack.
Trait Implementations
Auto Trait Implementations
impl<I> RefUnwindSafe for DStack<I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<I> Send for DStack<I> where
I: Send,
I: Send,
impl<I> Sync for DStack<I> where
I: Sync,
I: Sync,
impl<I> Unpin for DStack<I> where
I: Unpin,
I: Unpin,
impl<I> UnwindSafe for DStack<I> where
I: UnwindSafe,
I: 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<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub unsafe fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
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>,