pub enum HybridGraph {
CSR(CSRGraph),
BitPacked(BitPackedGraph),
Compressed(CompressedAdjacencyList),
}Expand description
Hybrid graph representation that chooses optimal format based on graph properties
Variants§
CSR(CSRGraph)
Use CSR for sparse graphs
BitPacked(BitPackedGraph)
Use bit-packed for dense unweighted graphs
Compressed(CompressedAdjacencyList)
Use compressed adjacency for medium density
Implementations§
Source§impl HybridGraph
impl HybridGraph
Sourcepub fn auto_select(
n_nodes: usize,
edges: Vec<(usize, usize, Option<f64>)>,
directed: bool,
) -> Result<Self, GraphError>
pub fn auto_select( n_nodes: usize, edges: Vec<(usize, usize, Option<f64>)>, directed: bool, ) -> Result<Self, GraphError>
Automatically choose the best representation based on graph properties
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get memory usage
Auto Trait Implementations§
impl Freeze for HybridGraph
impl RefUnwindSafe for HybridGraph
impl Send for HybridGraph
impl Sync for HybridGraph
impl Unpin for HybridGraph
impl UnwindSafe for HybridGraph
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more