Struct sprs::stack::DStack[][src]

pub struct DStack<I> { /* fields omitted */ }

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]

pub fn with_capacity(n: usize) -> Self where
    I: Default
[src]

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]

impl<I: Debug> Debug for DStack<I>[src]

Auto Trait Implementations

impl<I> RefUnwindSafe for DStack<I> where
    I: RefUnwindSafe

impl<I> Send for DStack<I> where
    I: Send

impl<I> Sync for DStack<I> where
    I: Sync

impl<I> Unpin for DStack<I> where
    I: Unpin

impl<I> UnwindSafe for DStack<I> where
    I: UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.