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.
pub fn from_property_graph(conn: &Connection) -> Self
pub fn from_provider(gp: &GraphProvider) -> Self
Auto Trait Implementations§
impl Freeze 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