pub struct PageRankRun {
pub scores: Vec<f64>,
pub iterations: usize,
pub diff_l1: f64,
pub converged: bool,
}Expand description
Result of a PageRank run: scores plus convergence diagnostics.
The *_run variants (pagerank_run, pagerank_weighted_run,
personalized_pagerank_run) return this struct; the shorter variants
(pagerank, etc.) discard the diagnostics and return only scores.
Use the diagnostic fields when tuning max_iterations / tolerance or
when bench-marking convergence across graphs of different sizes.
Fields§
§scores: Vec<f64>PageRank score per node, indexed by node id. Sums to approximately
1.0 modulo floating-point and dangling-node redistribution.
iterations: usizeNumber of power-iteration steps executed. Equal to
config.max_iterations when converged == false.
diff_l1: f64L1 norm of the score delta at the final iteration. Compare against
config.tolerance to see how close we were to converging.
converged: boolWhether the run converged (diff_l1 < config.tolerance) before hitting
config.max_iterations.
Trait Implementations§
Source§impl Clone for PageRankRun
impl Clone for PageRankRun
Source§fn clone(&self) -> PageRankRun
fn clone(&self) -> PageRankRun
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PageRankRun
impl Debug for PageRankRun
Source§impl<'de> Deserialize<'de> for PageRankRun
impl<'de> Deserialize<'de> for PageRankRun
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for PageRankRun
impl RefUnwindSafe for PageRankRun
impl Send for PageRankRun
impl Sync for PageRankRun
impl Unpin for PageRankRun
impl UnsafeUnpin for PageRankRun
impl UnwindSafe for PageRankRun
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
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>
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>
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