Struct graph_types::DynamicEdge
source · pub struct DynamicEdge {
pub bidi: EdgeDirection,
pub from: usize,
pub goto: usize,
}
Expand description
DynamicEdge represents an bidirectional edge between two nodes.
Also known as an arc.
Examples
use graph_theory::GraphEngine;
Fields§
§bidi: EdgeDirection
The direction of the edge.
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.
Trait Implementations§
source§impl Clone for DynamicEdge
impl Clone for DynamicEdge
source§fn clone(&self) -> DynamicEdge
fn clone(&self) -> DynamicEdge
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 DynamicEdge
impl Debug for DynamicEdge
source§impl Display for DynamicEdge
impl Display for DynamicEdge
source§impl Edge for DynamicEdge
impl Edge for DynamicEdge
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 PartialEq<DynamicEdge> for DynamicEdge
impl PartialEq<DynamicEdge> for DynamicEdge
source§fn eq(&self, other: &DynamicEdge) -> bool
fn eq(&self, other: &DynamicEdge) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for DynamicEdge
impl Eq for DynamicEdge
impl StructuralEq for DynamicEdge
impl StructuralPartialEq for DynamicEdge
Auto Trait Implementations§
impl RefUnwindSafe for DynamicEdge
impl Send for DynamicEdge
impl Sync for DynamicEdge
impl Unpin for DynamicEdge
impl UnwindSafe for DynamicEdge
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