Struct OptDenseDigraph

Source
pub struct OptDenseDigraph<N, E> { /* private fields */ }

Implementations§

Source§

impl<N: Default, E: Default> OptDenseDigraph<N, E>

Source

pub fn new(n: usize) -> OptDenseDigraph<N, E>

Source

pub fn ref_graph(&self) -> &Graph<N, E, Directed>

Source

pub fn add_node_with_weight(&mut self, weight: N) -> NodeIdx

Source

pub fn add_node(&mut self) -> NodeIdx

Source

pub fn add_edge_with_weight(&mut self, src: NodeIdx, dst: NodeIdx, weight: E)

Source

pub fn add_edge(&mut self, src: NodeIdx, dst: NodeIdx)

Source

pub fn from_( num_nodes: NodeIdx, edge_list: &[(NodeIdx, NodeIdx)], ) -> OptDenseDigraph<N, E>

Trait Implementations§

Source§

impl<N: Debug, E: Debug> Debug for OptDenseDigraph<N, E>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<N, E> DirectedGraph for OptDenseDigraph<N, E>

Source§

fn node_count(&self) -> NodeIdx

Source§

fn has_edge(&self, src: NodeIdx, dst: NodeIdx) -> bool

Source§

fn each_undirected_neighbor<F: FnMut(NodeIdx)>( &self, node: NodeIdx, callback: F, )

Source§

impl<N, E> From<Graph<N, E>> for OptDenseDigraph<N, E>

Source§

fn from(graph: Graph<N, E, Directed>) -> OptDenseDigraph<N, E>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<N, E> Freeze for OptDenseDigraph<N, E>

§

impl<N, E> RefUnwindSafe for OptDenseDigraph<N, E>

§

impl<N, E> Send for OptDenseDigraph<N, E>
where N: Send, E: Send,

§

impl<N, E> Sync for OptDenseDigraph<N, E>
where N: Sync, E: Sync,

§

impl<N, E> Unpin for OptDenseDigraph<N, E>
where N: Unpin, E: Unpin,

§

impl<N, E> UnwindSafe for OptDenseDigraph<N, E>
where N: UnwindSafe, E: 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.