pub struct QueryGraph {
pub nodes: HashMap<String, NodeData>,
pub idf_cache: HashMap<String, f64>,
/* private fields */
}Fields§
§nodes: HashMap<String, NodeData>§idf_cache: HashMap<String, f64>Implementations§
Source§impl QueryGraph
impl QueryGraph
pub fn new() -> Self
pub fn add_node(&mut self, id: impl Into<String>, data: NodeData)
pub fn add_edge( &mut self, u: impl Into<String>, v: impl Into<String>, data: EdgeData, )
pub fn neighbors(&self, id: &str) -> Vec<(&str, &EdgeData)>
pub fn degree(&self, id: &str) -> usize
pub fn node_count(&self) -> usize
Trait Implementations§
Source§impl Debug for QueryGraph
impl Debug for QueryGraph
Auto Trait Implementations§
impl Freeze for QueryGraph
impl RefUnwindSafe for QueryGraph
impl Send for QueryGraph
impl Sync for QueryGraph
impl Unpin for QueryGraph
impl UnsafeUnpin for QueryGraph
impl UnwindSafe for QueryGraph
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
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