pub struct DirectedEdge {
pub from: usize,
pub goto: usize,
}
Expand description
DirectedEdge represents an bidirectional edge between two nodes.
Also known as an arc.
§Examples
use graph_theory::GraphEngine;
Fields§
§from: usize
The index of the node that the edge is coming from.
goto: usize
The index of the node that the edge is going to.
Implementations§
Source§impl DirectedEdge
impl DirectedEdge
Source§impl DirectedEdge
impl DirectedEdge
Sourcepub fn as_unsupported<T>(&self) -> Result<T, GraphError>
pub fn as_unsupported<T>(&self) -> Result<T, GraphError>
Returns the edge as a directed edge, with the smaller index as the from
node.
Trait Implementations§
Source§impl Clone for DirectedEdge
impl Clone for DirectedEdge
Source§fn clone(&self) -> DirectedEdge
fn clone(&self) -> DirectedEdge
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DirectedEdge
impl Debug for DirectedEdge
Source§impl Display for DirectedEdge
impl Display for DirectedEdge
Source§impl Edge for DirectedEdge
impl Edge for DirectedEdge
Source§fn direction(&self) -> EdgeDirection
fn direction(&self) -> EdgeDirection
Whether the edge is bidirectional Read more
Source§fn delta_index(&self) -> usize
fn delta_index(&self) -> usize
The smaller of the two indices. Read more
Source§impl From<DirectedEdge> for EdgeQuery
impl From<DirectedEdge> for EdgeQuery
Source§fn from(edge: DirectedEdge) -> EdgeQuery
fn from(edge: DirectedEdge) -> EdgeQuery
Converts to this type from the input type.
Source§impl PartialEq for DirectedEdge
impl PartialEq for DirectedEdge
impl Copy for DirectedEdge
impl Eq for DirectedEdge
impl StructuralPartialEq for DirectedEdge
Auto Trait Implementations§
impl Freeze for DirectedEdge
impl RefUnwindSafe for DirectedEdge
impl Send for DirectedEdge
impl Sync for DirectedEdge
impl Unpin for DirectedEdge
impl UnwindSafe for DirectedEdge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more