pub struct EigenvectorCentralityResult {
pub scores: HashMap<EntityId, f64>,
pub iterations: usize,
pub converged: bool,
pub final_delta: f64,
}Expand description
Result of Eigenvector Centrality computation.
Fields§
§scores: HashMap<EntityId, f64>Eigenvector centrality scores for each node.
iterations: usizeNumber of iterations performed.
converged: boolWhether the algorithm converged within tolerance.
final_delta: f64Final convergence delta (max change in last iteration).
Implementations§
Source§impl EigenvectorCentralityResult
impl EigenvectorCentralityResult
Sourcepub fn score(&self, node: EntityId) -> Option<f64>
pub fn score(&self, node: EntityId) -> Option<f64>
Get the eigenvector centrality score for a specific node.
Sourcepub fn sorted(&self) -> Vec<(EntityId, f64)>
pub fn sorted(&self) -> Vec<(EntityId, f64)>
Get nodes sorted by eigenvector centrality (descending).
Sourcepub fn top_n(&self, n: usize) -> Vec<(EntityId, f64)>
pub fn top_n(&self, n: usize) -> Vec<(EntityId, f64)>
Get the top N nodes by eigenvector centrality.
Sourcepub fn max(&self) -> Option<(EntityId, f64)>
pub fn max(&self) -> Option<(EntityId, f64)>
Get the node with the highest eigenvector centrality.
Trait Implementations§
Source§impl Clone for EigenvectorCentralityResult
impl Clone for EigenvectorCentralityResult
Source§fn clone(&self) -> EigenvectorCentralityResult
fn clone(&self) -> EigenvectorCentralityResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EigenvectorCentralityResult
impl RefUnwindSafe for EigenvectorCentralityResult
impl Send for EigenvectorCentralityResult
impl Sync for EigenvectorCentralityResult
impl Unpin for EigenvectorCentralityResult
impl UnsafeUnpin for EigenvectorCentralityResult
impl UnwindSafe for EigenvectorCentralityResult
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