pub struct AdjGraph {
pub node_ids: Vec<String>,
pub node_to_idx: HashMap<String, usize>,
pub adj: Vec<Vec<(usize, f64)>>,
pub degree: Vec<f64>,
pub total_weight: f64,
}Fields§
§node_ids: Vec<String>§node_to_idx: HashMap<String, usize>§adj: Vec<Vec<(usize, f64)>>Symmetric adjacency: every undirected edge {i,j} appears as (i→j) in
adj[i] and (j→i) in adj[j]. Neighbor lists are sorted by index.
degree: Vec<f64>§total_weight: f64Sum of unique undirected edge weights (each edge counted once).
Implementations§
Source§impl AdjGraph
impl AdjGraph
pub fn node_count(&self) -> usize
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Number of unique undirected edges.
Sourcepub fn from_property_graph<S: GraphSource + ?Sized>(source: &S) -> Self
pub fn from_property_graph<S: GraphSource + ?Sized>(source: &S) -> Self
The file graph of source among the files it serves now (G04): a
withdrawn file is no node, so it carries no edge, no degree and no
weight into the partition, the edge counts, cohesion or modularity.
Under protection a graph with more files than one request can decide
yields the empty graph (GraphGate::ranking_files, no seeds).
Sourcepub fn from_provider(gp: &GraphProvider) -> Self
pub fn from_provider(gp: &GraphProvider) -> Self
As Self::from_property_graph, for either backend: the files and
edges come from one gated read (GraphProvider::ranking_graph).
Auto Trait Implementations§
impl Forget for AdjGraph
impl Freeze for AdjGraph
impl Move for AdjGraph
impl RefUnwindSafe for AdjGraph
impl Send for AdjGraph
impl Sync for AdjGraph
impl Unpin for AdjGraph
impl UnsafeUnpin for AdjGraph
impl UnwindSafe for AdjGraph
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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