Struct graph_types::DirectedEdge
source · 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§
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§fn as_dynamic(&self) -> DynamicEdge
fn as_dynamic(&self) -> DynamicEdge
Creates a new edge with the indices swapped.
source§impl From<DirectedEdge> for EdgeQuery
impl From<DirectedEdge> for EdgeQuery
source§fn from(edge: DirectedEdge) -> Self
fn from(edge: DirectedEdge) -> Self
Converts to this type from the input type.
source§impl PartialEq<DirectedEdge> for DirectedEdge
impl PartialEq<DirectedEdge> for DirectedEdge
source§fn eq(&self, other: &DirectedEdge) -> bool
fn eq(&self, other: &DirectedEdge) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for DirectedEdge
impl Eq for DirectedEdge
impl StructuralEq for DirectedEdge
impl StructuralPartialEq for DirectedEdge
Auto Trait Implementations§
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