#[repr(u8)]pub enum GraphKind {
Directed = 0,
Undirected = 1,
}
Expand description
Mark the graph as directed or undirected.
Generally speaking, a directed graph engine can insert undirected edges, but a undirected graph engine cannot insert directed edges.
§Examples
use graph_theory::{graph_engines::CycleGraph, GraphEngine, GraphKind};
assert_eq!(CycleGraph::one_way(5).graph_kind(), GraphKind::Directed);
assert_eq!(CycleGraph::two_way(5).graph_kind(), GraphKind::Undirected);
Variants§
Implementations§
Source§impl GraphKind
impl GraphKind
pub const fn is_one_way(&self) -> bool
pub const fn is_two_way(&self) -> bool
Trait Implementations§
impl Copy for GraphKind
impl Eq for GraphKind
impl StructuralPartialEq for GraphKind
Auto Trait Implementations§
impl Freeze for GraphKind
impl RefUnwindSafe for GraphKind
impl Send for GraphKind
impl Sync for GraphKind
impl Unpin for GraphKind
impl UnwindSafe for GraphKind
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