RecurQueue

Struct RecurQueue 

Source
pub struct RecurQueue<P: Params>(/* private fields */);
Expand description

Queue of lazily-generated pairs of nodes that must next be compared pairwise. The size is limited only by available memory. Specifies use of this.

Does breadth-first traversals. Typically used when it is likely that the input graphs will be deeper than they are wide. Great depth can be handled with very little memory usage, but great width can cause excessive memory usage.

(If, instead, you want to limit how much a recursion-queue can grow, you must impl RecurMode for your own type that does that and use it with the generic API.)

Trait Implementations§

Source§

impl<P: Params> Default for RecurQueue<P>

Source§

fn default() -> Self

Create a new instance with capacity P::INITIAL_CAPACITY.

Source§

impl<P: Params> From<CallStack> for RecurQueue<P>

Enables the call-stack to be used for the precheck and the vector-queue for the interleave, if desired.

Source§

fn from(_: CallStack) -> Self

Converts to this type from the input type.
Source§

impl<E, V> RecurMode<E> for RecurQueue<V>
where E: Params<RecurMode = Self>, V: Params<Node = E::Node>, Infallible: Into<E::Error>,

Enables RecurQueue to be used with the algorithm.

Source§

fn reset(self) -> Self

An aborted precheck, that uses RecurQueue, might have left some elements, so we must reset before doing the interleave using the same RecurQueue.

Source§

type Error = Infallible

Type of error that can occur.
Source§

fn recur( it: &mut Equiv<E>, edges_iter: EdgesIter<E::Node>, ) -> Result<<E::Node as Node>::Cmp, Self::Error>

Arrange for the given nodes to be recurred on, either immediately or later. Read more
Source§

fn next(&mut self) -> Option<CounterpartsResult<E::Node>>

Supply the next counterpart nodes for the algorithm to compare, if any were saved for later by Self::recur. Read more

Auto Trait Implementations§

§

impl<P> Freeze for RecurQueue<P>

§

impl<P> RefUnwindSafe for RecurQueue<P>
where <P as Params>::Node: RefUnwindSafe, <<P as Params>::Node as Node>::Index: RefUnwindSafe,

§

impl<P> Send for RecurQueue<P>
where <P as Params>::Node: Send, <<P as Params>::Node as Node>::Index: Send,

§

impl<P> Sync for RecurQueue<P>
where <P as Params>::Node: Sync, <<P as Params>::Node as Node>::Index: Sync,

§

impl<P> Unpin for RecurQueue<P>
where <P as Params>::Node: Unpin, <<P as Params>::Node as Node>::Index: Unpin,

§

impl<P> UnwindSafe for RecurQueue<P>
where <P as Params>::Node: UnwindSafe, <<P as Params>::Node as Node>::Index: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.