[−][src]Struct sprs::stack::DStack
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.
Methods
impl<I> DStack<I> where
I: Copy,
[src]
I: Copy,
pub fn with_capacity(n: usize) -> DStack<I> 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
impl<I: Clone> Clone for DStack<I>
[src]
fn clone(&self) -> DStack<I>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<I: Debug> Debug for DStack<I>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,