Struct graph_types::UndirectedEdge
source · pub struct UndirectedEdge {
pub from: usize,
pub goto: usize,
}
Expand description
UndirectedEdge represents an bidirectional edge between two nodes.
Examples
use graph_theory::GraphEngine;
Fields§
§from: usize
The index of the node that the edge is coming from, usually the smaller index.
goto: usize
The index of the node that the edge is going to, usually the larger index.
Implementations§
Trait Implementations§
source§impl Clone for UndirectedEdge
impl Clone for UndirectedEdge
source§fn clone(&self) -> UndirectedEdge
fn clone(&self) -> UndirectedEdge
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 UndirectedEdge
impl Debug for UndirectedEdge
source§impl Display for UndirectedEdge
impl Display for UndirectedEdge
source§impl Edge for UndirectedEdge
impl Edge for UndirectedEdge
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<UndirectedEdge> for EdgeQuery
impl From<UndirectedEdge> for EdgeQuery
source§fn from(edge: UndirectedEdge) -> Self
fn from(edge: UndirectedEdge) -> Self
Converts to this type from the input type.
source§impl PartialEq<UndirectedEdge> for UndirectedEdge
impl PartialEq<UndirectedEdge> for UndirectedEdge
source§fn eq(&self, other: &UndirectedEdge) -> bool
fn eq(&self, other: &UndirectedEdge) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for UndirectedEdge
impl Eq for UndirectedEdge
impl StructuralEq for UndirectedEdge
impl StructuralPartialEq for UndirectedEdge
Auto Trait Implementations§
impl RefUnwindSafe for UndirectedEdge
impl Send for UndirectedEdge
impl Sync for UndirectedEdge
impl Unpin for UndirectedEdge
impl UnwindSafe for UndirectedEdge
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