pub struct GraphStats {
pub num_vertices: usize,
pub num_edges: usize,
pub avg_degree: f64,
pub max_degree: usize,
pub min_degree: usize,
pub is_connected: bool,
pub density: f64,
}Expand description
Aggregate statistics of a graph.
Fields§
§num_vertices: usizeTotal number of vertices.
num_edges: usizeTotal number of edges (for undirected graphs, each undirected edge is counted once even though both (i,j) and (j,i) appear in the adjacency list).
avg_degree: f64Average degree across all vertices.
max_degree: usizeMaximum degree of any vertex.
min_degree: usizeMinimum degree of any vertex.
is_connected: boolWhether the graph is approximately connected (BFS from vertex 0 reaches
90 % of vertices).
density: f64Edge density: ratio of existing edges to maximum possible edges.
Trait Implementations§
Source§impl Clone for GraphStats
impl Clone for GraphStats
Source§fn clone(&self) -> GraphStats
fn clone(&self) -> GraphStats
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 GraphStats
impl Debug for GraphStats
Auto Trait Implementations§
impl Freeze for GraphStats
impl RefUnwindSafe for GraphStats
impl Send for GraphStats
impl Sync for GraphStats
impl Unpin for GraphStats
impl UnsafeUnpin for GraphStats
impl UnwindSafe for GraphStats
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