[−][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
Auto Trait Implementations
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,
impl<I> RefUnwindSafe for DStack<I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,