pub struct GraphProperties {
pub node_count: usize,
pub edge_weight_sum: usize,
pub n_connected_components: usize,
pub fraction_in_largest_component: f64,
pub stranded_nodes: usize,
pub component_size_distribution: FxHashMap<usize, usize>,
}Expand description
Stores basic properties/statistics of a graph.
Fields§
§node_count: usizeNumber of nodes in the graph.
edge_weight_sum: usizeSum of undirected edge weights in the graph.
n_connected_components: usizeNumber of connected components in the graph.
fraction_in_largest_component: f64Fraction of nodes in the largest connected component.
stranded_nodes: usizeNumber of nodes in components smaller than 8000 umis
component_size_distribution: FxHashMap<usize, usize>Distribution of the component sizes
Implementations§
Source§impl GraphProperties
impl GraphProperties
Sourcepub fn new<T: EdgeWeight>(graph: &Graph<T>) -> Self
pub fn new<T: EdgeWeight>(graph: &Graph<T>) -> Self
Computes graph properties for the given graph.
Trait Implementations§
Source§impl Clone for GraphProperties
impl Clone for GraphProperties
Source§fn clone(&self) -> GraphProperties
fn clone(&self) -> GraphProperties
Returns a duplicate 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 GraphProperties
impl Debug for GraphProperties
Source§impl From<PartitionedGraphStatistics> for GraphProperties
impl From<PartitionedGraphStatistics> for GraphProperties
Source§fn from(partitioned_graph_stats: PartitionedGraphStatistics) -> Self
fn from(partitioned_graph_stats: PartitionedGraphStatistics) -> Self
Convert PartitionedGraphStatistics into GraphProperties, assuming crossing edges are removed.
Auto Trait Implementations§
impl Freeze for GraphProperties
impl RefUnwindSafe for GraphProperties
impl Send for GraphProperties
impl Sync for GraphProperties
impl Unpin for GraphProperties
impl UnwindSafe for GraphProperties
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.