Skip to main content

ReversedGraph

Struct ReversedGraph 

Source
pub struct ReversedGraph<G: Graph<S>, B: Borrow<G>, const S: usize = DEFAULT_GRAPH_SUCCS_NUM> { /* private fields */ }
Expand description

A reversed graph used for backward analysis.

Trait Implementations§

Source§

impl<G: Graph<S>, B: Borrow<G>, const S: usize> Graph<S> for ReversedGraph<G, B, S>

Source§

type NodeId = <G as Graph<S>>::NodeId

Source§

type EdgeId = <G as Graph<S>>::EdgeId

Source§

fn entry(&self) -> Self::NodeId

Entry node.
Source§

fn exit(&self) -> Self::NodeId

Exit node.
Source§

fn predecessors(&self, n: Self::NodeId) -> SmallVec<[Self::EdgeId; S]>

Predecessors of n.
Source§

fn successors(&self, n: Self::NodeId) -> SmallVec<[Self::EdgeId; S]>

Sucessors of n.
Source§

fn source(&self, e: Self::EdgeId) -> Self::NodeId

The source node of e.
Source§

fn target(&self, e: Self::EdgeId) -> Self::NodeId

The target node of e.
Source§

fn size(&self) -> usize

The number of all nodes.

Auto Trait Implementations§

§

impl<G, B, const S: usize> Freeze for ReversedGraph<G, B, S>
where B: Freeze,

§

impl<G, B, const S: usize> RefUnwindSafe for ReversedGraph<G, B, S>

§

impl<G, B, const S: usize = DEFAULT_GRAPH_SUCCS_NUM> !Send for ReversedGraph<G, B, S>

§

impl<G, B, const S: usize = DEFAULT_GRAPH_SUCCS_NUM> !Sync for ReversedGraph<G, B, S>

§

impl<G, B, const S: usize> Unpin for ReversedGraph<G, B, S>
where B: Unpin,

§

impl<G, B, const S: usize> UnsafeUnpin for ReversedGraph<G, B, S>
where B: UnsafeUnpin,

§

impl<G, B, const S: usize> UnwindSafe for ReversedGraph<G, B, S>

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<const S: usize, T> ReverseGraph<S> for T
where T: Graph<S>,

Source§

type G = T

Source§

fn rev(&self) -> ReversedGraph<T, &T, S>

Reversed graph.
Source§

fn into_rev(self) -> ReversedGraph<T, T, S>

Reversed graph that consumes the original graph.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<const S: usize, T> SuccessorNodes<S> for T
where T: Graph<S>,

Source§

type NodeId = <T as Graph<S>>::NodeId

Source§

fn get_succ_nodes( &self, n: <T as SuccessorNodes<S>>::NodeId, ) -> SmallVec<[<T as SuccessorNodes<S>>::NodeId; S]>

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.