Skip to main content

BidirectedAdjacencyArray

Struct BidirectedAdjacencyArray 

Source
pub struct BidirectedAdjacencyArray<IndexType: GraphIndexInteger, NodeData, EdgeData> { /* private fields */ }

Implementations§

Source§

impl<IndexType: GraphIndexInteger, NodeData, EdgeData> BidirectedAdjacencyArray<IndexType, NodeData, EdgeData>

Source

pub fn new( nodes: TaggedVec<NodeIndex<IndexType>, NodeData>, edges: TaggedVec<EdgeIndex<IndexType>, BidirectedEdge<IndexType, EdgeData>>, ) -> Self

Source

pub fn node_count(&self) -> usize

Source

pub fn edge_count(&self) -> usize

Source

pub fn iter_nodes(&self) -> impl Iterator<Item = NodeIndex<IndexType>>

Source

pub fn iter_edges(&self) -> impl Iterator<Item = EdgeIndex<IndexType>>

Source

pub fn iter_successors( &self, node: DirectedNodeIndex<IndexType>, ) -> impl Iterator<Item = (DirectedEdgeIndex<IndexType>, DirectedNodeIndex<IndexType>)>

Source

pub fn node_data(&self, node: NodeIndex<IndexType>) -> &NodeData

Source

pub fn edge( &self, edge: EdgeIndex<IndexType>, ) -> EdgeView<'_, IndexType, EdgeData>

Source

pub fn directed_edge_data<'this>( &'this self, edge: DirectedEdgeIndex<IndexType>, ) -> DirectedEdgeDataView<'this, EdgeData>

Source§

impl<IndexType: GraphIndexInteger, NodeData, EdgeData> BidirectedAdjacencyArray<IndexType, NodeData, EdgeData>

Source

pub fn compare( &self, other: &Self, ) -> Result<(), GraphComparisonError<IndexType>>
where NodeData: Eq, EdgeData: Eq,

Compares this graph to another graph.

The comparison returns Ok if all nodes and edges are identical in both graphs. Otherwise, it returns an Err describing the differences.

Trait Implementations§

Source§

impl<IndexType: Debug + GraphIndexInteger, NodeData: Debug, EdgeData: Debug> Debug for BidirectedAdjacencyArray<IndexType, NodeData, EdgeData>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<IndexType, NodeData, EdgeData> Freeze for BidirectedAdjacencyArray<IndexType, NodeData, EdgeData>

§

impl<IndexType, NodeData, EdgeData> RefUnwindSafe for BidirectedAdjacencyArray<IndexType, NodeData, EdgeData>
where IndexType: RefUnwindSafe, NodeData: RefUnwindSafe, EdgeData: RefUnwindSafe,

§

impl<IndexType, NodeData, EdgeData> Send for BidirectedAdjacencyArray<IndexType, NodeData, EdgeData>
where IndexType: Send, NodeData: Send, EdgeData: Send,

§

impl<IndexType, NodeData, EdgeData> Sync for BidirectedAdjacencyArray<IndexType, NodeData, EdgeData>
where IndexType: Sync, NodeData: Sync, EdgeData: Sync,

§

impl<IndexType, NodeData, EdgeData> Unpin for BidirectedAdjacencyArray<IndexType, NodeData, EdgeData>
where IndexType: Unpin, NodeData: Unpin, EdgeData: Unpin,

§

impl<IndexType, NodeData, EdgeData> UnwindSafe for BidirectedAdjacencyArray<IndexType, NodeData, EdgeData>
where IndexType: UnwindSafe, NodeData: UnwindSafe, EdgeData: 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.